1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-10-03 18:42:28 +01:00

italics enable|disable working

This commit is contained in:
Nisheet Sinvhal
2018-11-01 22:02:04 +05:30
committed by David Peter
parent d702d6740c
commit e90308e1f8
3 changed files with 10 additions and 4 deletions

View File

@@ -18,6 +18,7 @@ pub fn as_terminal_escaped(
text: &str,
true_color: bool,
colored: bool,
italics: bool,
) -> String {
let style = if !colored {
Style::default()
@@ -28,7 +29,7 @@ pub fn as_terminal_escaped(
color.bold()
} else if style.font_style.contains(FontStyle::UNDERLINE) {
color.underline()
} else if style.font_style.contains(FontStyle::ITALIC) {
} else if style.font_style.contains(FontStyle::ITALIC) && italics {
color.italic()
} else {
color.normal()