Skip to content

Commit 881ce66

Browse files
committed
Attempt normalizing escaped newlines
1 parent 40a2f9b commit 881ce66

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/utils.mts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ function normalizeLogSymbols(str: string): string {
3333
}
3434

3535
function normalizeNewlines(str: string): string {
36-
return str.replaceAll('\r\n', '\n')
36+
return str
37+
// Replace all literal \r\n.
38+
.replaceAll('\r\n', '\n')
39+
// Replace all escaped \\r\\n.
40+
.replaceAll('\\r\\n', '\n')
3741
}
3842

3943
function stripZeroWidthSpace(str: string): string {

0 commit comments

Comments
 (0)