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:
committed by
David Peter
parent
d702d6740c
commit
e90308e1f8
@@ -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()
|
||||
|
Reference in New Issue
Block a user