on master help sign in
Leave blank lines blank terminal output.

Would add some ANSI colour codes previously.

commit3523f602996aec1db01a3c2cc13fae265ae08389 authorMohamad Barbar <mbarbar@runbox.com> dateSat 7 Dec 2019, 12:01 (7 years ago) parent83dc846
1 file changed+4
src/terminal.rs+4
src/terminal.rs+4
@@ -27,6 +27,10 @@ pub fn as_terminal_escaped(
2727 italics: bool,
2828 background_color: Option<highlighting::Color>,
2929) -> String {
30+ if text.is_empty() {
31+ return text.to_string();
32+ }
33+
3034 let mut style = if !colored {
3135 Style::default()
3236 } else {