From 48f87d9698f5b3418dda20f790f7a6679f2f5126 Mon Sep 17 00:00:00 2001 From: Ben Sadeh <701096+bensadeh@users.noreply.github.com> Date: Sun, 24 Sep 2023 10:57:26 +0200 Subject: [PATCH] Simplify highlighting --- src/highlighters/keyword.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/highlighters/keyword.rs b/src/highlighters/keyword.rs index b111c09..f44490d 100644 --- a/src/highlighters/keyword.rs +++ b/src/highlighters/keyword.rs @@ -43,7 +43,7 @@ fn highlight_keywords(color: &str, input: &str, keyword_regex: &Regex, border: b if border { keyword_regex .replace_all(input, |cap: ®ex::Captures| { - format!("{} {}{}{} {}", color, &cap[0], color::RESET, color, color::RESET) + format!("{} {} {}", color, &cap[0], color::RESET) }) .to_string() } else {