Leave blank lines blank terminal output.

Would add some ANSI colour codes previously.
This commit is contained in:
Mohamad Barbar 2019-12-07 12:01:39 +11:00 committed by David Peter
parent 83dc8468b0
commit 3523f60299
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,10 @@ pub fn as_terminal_escaped(
italics: bool,
background_color: Option<highlighting::Color>,
) -> String {
if text.is_empty() {
return text.to_string();
}
let mut style = if !colored {
Style::default()
} else {