From 321aab0480e19d4fe37c3b42678ab13d1d876a11 Mon Sep 17 00:00:00 2001 From: Hiers Date: Sat, 4 Mar 2023 13:18:04 +0000 Subject: [PATCH] Few more minor changes to formatting. --- src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 53848c2..440c6a8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -216,7 +216,7 @@ fn format_sense(value: &Value, index: usize, prev_parts_of_speech: &mut String) // Do not repeat a meaning's part of speech if it is the same as the previous meaning if !parts.is_empty() && parts != *prev_parts_of_speech { *prev_parts_of_speech = parts.clone(); - format!("[{}]\n ", parts.bright_blue()) + format!("{}\n ", parts.bright_blue()) } else { String::new() } @@ -230,12 +230,13 @@ fn format_sense(value: &Value, index: usize, prev_parts_of_speech: &mut String) true }; + let index_str = format!("{}.",(index + 1)); let tags = format_sense_tags(value); (format!( - "{}{}. {} {}", + "{}{} {} {}", parts_of_speech, - (index + 1).to_string().bright_black(), + index_str.bright_black(), english_definiton .iter() .map(|i| value_to_str(i))