italics enable|disable working

This commit is contained in:
Nisheet Sinvhal authored and David Peter committed 2018-11-04 19:40:05 +01:00
1 parent d702d6740c
commit e90308e1f8
3 files changed
+10 -4

No files matched your search

+2 -1
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()