allow default color shortcut names (#5177)

* allow default color shortcut names

* clippy
This commit is contained in:
Darren Schroeder
2022-04-13 07:02:15 -05:00
committed by GitHub
parent 257290acc2
commit 10792a29f7
2 changed files with 13 additions and 6 deletions

View File

@ -161,6 +161,13 @@ pub fn lookup_ansi_color_style(s: &str) -> Style {
"dgrbl" | "dark_gray_blink" => Color::DarkGray.blink(),
"dgrst" | "dark_gray_strike" => Color::DarkGray.strikethrough(),
"def" | "default" => Color::Default.normal(),
"defb" | "default_bold" => Color::Default.bold(),
"defu" | "default_underline" => Color::Default.underline(),
"defi" | "default_italic" => Color::Default.italic(),
"defd" | "default_dimmed" => Color::Default.dimmed(),
"defr" | "default_reverse" => Color::Default.reverse(),
_ => Color::White.normal(),
}
}