-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative font to highlight differences #2
Comments
Current styles: Lines 10 to 21 in 42ba173
fn red(s: &str) -> ANSIString {
Colour::Red.paint(s)
}
fn on_red(s: &str) -> ANSIString {
Colour::Red.on(Colour::Fixed(52)).bold().paint(s)
}
fn green(s: &str) -> ANSIString {
Colour::Green.paint(s)
}
fn on_green(s: &str) -> ANSIString {
Colour::Green.on(Colour::Fixed(22)).bold().paint(s)
} I'm not sure what the reason is, but, in my IDE's embedded terminal, I get the following output:
Thus why I likely chose this styling. For completeness, the difference example uses (the equivalent of) If I'm not mistaken, you're asking for the following styling, which is not what the current version of fn red(s: &str) -> ANSIGenericString<str> {
Colour::Red.paint(s)
}
fn on_red(s: &str) -> ANSIGenericString<str> {
Colour::Red.bold().paint(s)
}
fn green(s: &str) -> ANSIGenericString<str> {
Colour::Green.paint(s)
}
fn on_green(s: &str) -> ANSIGenericString<str> {
Colour::Green.bold().paint(s)
} which looks like this in my IDE terminal: If |
pretty-assertions
presents differences between characters by also making differing characters boldface (1), whereascolored_diff::PrettyDifference
changes the background color behind those characters (2). The former is more readable and its readability is far less dependent on terminal color scheme.My proposal is to implement presentation 1 in
colored_diff::PrettyDifference
.The text was updated successfully, but these errors were encountered: