mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
fix(formatter): incorrect handling of CRLF for multiline block comment (#16528)
close: #16405 In Windows, a multiline block comment contains a `\r\n` line break. However, the printer assumes all text has no `\r` at all; see #16531. In this PR, we use `LineTerminatorSplitter` to normalize all line breaks to `\n` to solve this problem.
This commit is contained in:
1 parent
fd33a4da67
commit
75393e74ec
6 files changed
+147
-18
No files matched your search
@@ -1,3 +1,4 @@
|
||||
crates/oxc_formatter/tests/fixtures/** text=auto eol=lf
|
||||
crates/oxc_formatter/tests/fixtures/js/crlf text=auto eol=crlf
|
||||
apps/oxfmt/test/fixtures/** text=auto eol=lf
|
||||
apps/oxlint/test/fixtures/** text=auto eol=lf
|
||||
Reference in new issue
Block a user