diff options
| author | Jonas Maier <> | 2026-05-24 18:02:04 +0200 |
|---|---|---|
| committer | Jonas Maier <> | 2026-05-24 18:02:04 +0200 |
| commit | 01a198b8ad42680c9333039c75317d1787120c78 (patch) | |
| tree | 96fac6e66a4f454ba0d6a4fc6d61226346c3258a /src/syntax_highlighting.rs | |
| parent | 52e97864d483f1f442e96058a17c159c5be10db3 (diff) | |
| download | pish-01a198b8ad42680c9333039c75317d1787120c78.tar.gz | |
better multiline handling
Diffstat (limited to 'src/syntax_highlighting.rs')
| -rw-r--r-- | src/syntax_highlighting.rs | 6 |
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))?; |
