Skip to content

Commit

Permalink
Make "color" in json not case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
charklie authored May 6, 2024
1 parent 98ab489 commit d024487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/color_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl JsonColors {

pub fn get_color_by_section(&self, section: &str) -> Option<Color> {
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),
Expand Down

0 comments on commit d024487

Please sign in to comment.