summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosmicHorror <CosmicHorrorDev@pm.me>2023-11-02 19:31:21 -0600
committerGitHub <noreply@github.com>2023-11-02 20:31:21 -0500
commit345497a64ad6e19b0012963954615102ad1dd238 (patch)
tree6e96f8a446a61648a065fce6fdb249f4d92e7a96
parent4f77cfe1b8681bd164ea990e6c0ec2c2b8acb614 (diff)
Make modified text blue instead of green (#269)
-rw-r--r--src/replacer/mod.rs4
-rw-r--r--tests/cli.rs6
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(())