1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Red and green, bold.

This commit is contained in:
Rob Rix 2015-11-02 18:03:02 -05:00
parent a22491ceda
commit c89aa9c16f

View File

@ -53,8 +53,8 @@ private struct Attribute {
}
private func unified(patch: Patch<Term>, before: String, after: String) -> String {
return (patch.state.before.map { "{-\(unified($0, source: before))-}" } ?? "")
+ (patch.state.after.map { "{+\(unified($0, source: after))+}" } ?? "")
return (patch.state.before.map { Attribute(colour: .Red, style: .Bold).wrap("{-\(unified($0, source: before))-}") } ?? "")
+ (patch.state.after.map { Attribute(colour: .Green, style: .Bold).wrap("{+\(unified($0, source: after))+}") } ?? "")
}
private func range(patch: Patch<Term>) -> Range<Int>? {