aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax_highlighting.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax_highlighting.rs')
-rw-r--r--src/syntax_highlighting.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/syntax_highlighting.rs b/src/syntax_highlighting.rs
index 1a6e626..043509a 100644
--- a/src/syntax_highlighting.rs
+++ b/src/syntax_highlighting.rs
@@ -124,7 +124,11 @@ impl Highlighter {
}
}
- stdout.write_all(&[x])?;
+ if x == b'\n' {
+ stdout.write_all(b"\r\n")?;
+ } else {
+ stdout.write_all(&[x])?;
+ }
}
stdout.write_all(self.color(HighlightKind::None))?;