mirror of
https://github.com/github/semantic.git
synced 2024-12-01 00:33:59 +03:00
Red and green, bold.
This commit is contained in:
parent
a22491ceda
commit
c89aa9c16f
@ -53,8 +53,8 @@ private struct Attribute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func unified(patch: Patch<Term>, before: String, after: String) -> String {
|
private func unified(patch: Patch<Term>, before: String, after: String) -> String {
|
||||||
return (patch.state.before.map { "{-\(unified($0, source: before))-}" } ?? "")
|
return (patch.state.before.map { Attribute(colour: .Red, style: .Bold).wrap("{-\(unified($0, source: before))-}") } ?? "")
|
||||||
+ (patch.state.after.map { "{+\(unified($0, source: after))+}" } ?? "")
|
+ (patch.state.after.map { Attribute(colour: .Green, style: .Bold).wrap("{+\(unified($0, source: after))+}") } ?? "")
|
||||||
}
|
}
|
||||||
|
|
||||||
private func range(patch: Patch<Term>) -> Range<Int>? {
|
private func range(patch: Patch<Term>) -> Range<Int>? {
|
||||||
|
Loading…
Reference in New Issue
Block a user