From d024487823e1f462a2b9ec00189c17e1ef8c82b8 Mon Sep 17 00:00:00 2001 From: charklie <157241212+charklie@users.noreply.github.com> Date: Mon, 6 May 2024 22:03:51 +0200 Subject: [PATCH] Make "color" in json not case sensitive --- src/color_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/color_config.rs b/src/color_config.rs index 1d8bf66..beb6664 100644 --- a/src/color_config.rs +++ b/src/color_config.rs @@ -48,7 +48,7 @@ impl JsonColors { pub fn get_color_by_section(&self, section: &str) -> Option { match self.colors.get(section) { - Some(color_str) => match color_str.as_str() { + Some(color_str) => match color_str.to_ascii_lowercase().as_str() { "green" => Some(Color::Green), "red" => Some(Color::Red), "purple" | "magenta" => Some(Color::Purple),