From 2922dbc568d831627c6aac7e5b2ad87f1f9cda08 Mon Sep 17 00:00:00 2001 From: iff Date: Mon, 31 Jul 2023 19:59:16 +0200 Subject: [PATCH] format: remove additional space at suggestion --- src/style.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/style.rs b/src/style.rs index 018de18..70c5104 100644 --- a/src/style.rs +++ b/src/style.rs @@ -7,6 +7,9 @@ pub fn highlight_difference(corrected_command: &str, last_command: &str) -> Stri let split_last_command = last_command.split(' '); for new in split_corrected_command { + if new == "" { + continue; + } let mut changed = true; for old in split_last_command.clone() { if new == old { @@ -24,6 +27,5 @@ pub fn highlight_difference(corrected_command: &str, last_command: &str) -> Stri highlighted_command.push(' '); } - highlighted_command.pop(); highlighted_command.trim().to_string() }