From 01a198b8ad42680c9333039c75317d1787120c78 Mon Sep 17 00:00:00 2001 From: Jonas Maier <> Date: Sun, 24 May 2026 18:02:04 +0200 Subject: better multiline handling --- src/syntax_highlighting.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/syntax_highlighting.rs') 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))?; -- cgit v1.2.3