Fix handling of spaces between language, switches, and parameters.
This commit is contained in:
@@ -235,7 +235,7 @@ impl<'b, 's> DiffResult<'b, 's> {
|
||||
.any(|child| child.is_immediately_bad() || child.has_bad_children())
|
||||
}
|
||||
|
||||
fn foreground_color(red: u8, green: u8, blue: u8) -> String {
|
||||
pub(crate) fn foreground_color(red: u8, green: u8, blue: u8) -> String {
|
||||
if DiffResult::should_use_color() {
|
||||
format!(
|
||||
"\x1b[38;2;{red};{green};{blue}m",
|
||||
@@ -249,7 +249,7 @@ impl<'b, 's> DiffResult<'b, 's> {
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn background_color(red: u8, green: u8, blue: u8) -> String {
|
||||
pub(crate) fn background_color(red: u8, green: u8, blue: u8) -> String {
|
||||
if DiffResult::should_use_color() {
|
||||
format!(
|
||||
"\x1b[48;2;{red};{green};{blue}m",
|
||||
@@ -262,7 +262,7 @@ impl<'b, 's> DiffResult<'b, 's> {
|
||||
}
|
||||
}
|
||||
|
||||
fn reset_color() -> &'static str {
|
||||
pub(crate) fn reset_color() -> &'static str {
|
||||
if DiffResult::should_use_color() {
|
||||
"\x1b[0m"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user