From 345497a64ad6e19b0012963954615102ad1dd238 Mon Sep 17 00:00:00 2001 From: CosmicHorror Date: Thu, 2 Nov 2023 19:31:21 -0600 Subject: Make modified text blue instead of green (#269) --- src/replacer/mod.rs | 4 ++-- tests/cli.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/replacer/mod.rs b/src/replacer/mod.rs index d0a90a2..d871323 100644 --- a/src/replacer/mod.rs +++ b/src/replacer/mod.rs @@ -131,13 +131,13 @@ impl Replacer { new.extend_from_slice(&haystack[last_match..m.start()]); if use_color { new.extend_from_slice( - ansi_term::Color::Green.prefix().to_string().as_bytes(), + ansi_term::Color::Blue.prefix().to_string().as_bytes(), ); } rep.replace_append(&cap, &mut new); if use_color { new.extend_from_slice( - ansi_term::Color::Green.suffix().to_string().as_bytes(), + ansi_term::Color::Blue.suffix().to_string().as_bytes(), ); } last_match = m.end(); diff --git a/tests/cli.rs b/tests/cli.rs index a727ed5..6bf78cc 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -83,8 +83,8 @@ mod cli { .success() .stdout(format!( "{}{}def\n", - ansi_term::Color::Green.prefix(), - ansi_term::Color::Green.suffix() + ansi_term::Color::Blue.prefix(), + ansi_term::Color::Blue.suffix() )); assert_file(file.path(), "abc123def"); @@ -227,7 +227,7 @@ mod cli { .success() .stdout(format!( "{}\nfoo\nfoo\n", - ansi_term::Color::Green.paint("bar") + ansi_term::Color::Blue.paint("bar") )); Ok(()) -- cgit v1.2.3