Commit ab4848a
committed
fix: CRLF newline handling and error span rendering
Previously, newline detection operated per character, causing CRLF to be
treated as two separate newlines. This resulted in incorrect line numbers,
extra blank lines, and misaligned error spans on Windows inputs.
This change introduces CRLF-aware newline parsing while preserving support
for LF, CR, and Unicode newline characters.
Also fixes:
- incorrect line/column calculation for multi-line spans
- UTF-16 column alignment for multi-byte characters
- off-by-one error in multiline underline rendering
- zero-length spans not displaying a caret
Error rendering is now consistent across platforms and input encodings.
Merge after PR #2571 parent ade9d7a commit ab4848a
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| |||
704 | 704 | | |
705 | 705 | | |
706 | 706 | | |
707 | | - | |
708 | | - | |
| 707 | + | |
| 708 | + | |
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
| |||
885 | 885 | | |
886 | 886 | | |
887 | 887 | | |
888 | | - | |
| 888 | + | |
0 commit comments