From 8319bd83b3d760d6e158de6af8b90d08442ab058 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 29 Apr 2025 11:29:05 -0400 Subject: [PATCH] Update CSS parser tests to preserve CRLF where needed --- packages/tailwindcss/src/css-parser.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/tailwindcss/src/css-parser.test.ts b/packages/tailwindcss/src/css-parser.test.ts index 379b4b942..f7ee47a61 100644 --- a/packages/tailwindcss/src/css-parser.test.ts +++ b/packages/tailwindcss/src/css-parser.test.ts @@ -86,7 +86,7 @@ describe.each(['Unix', 'Windows'])('Line endings: %s', (lineEndings) => { kind: 'comment', value: `! * License #2 - `, + `.replaceAll(/\r?\n/g, lineEndings === 'Windows' ? '\r\n' : '\n'), }, ]) }) @@ -368,7 +368,7 @@ describe.each(['Unix', 'Windows'])('Line endings: %s', (lineEndings) => { background-color: red; /* A comment */ content: 'Hello, world!'; - }`, + }`.replaceAll(/\r?\n/g, lineEndings === 'Windows' ? '\r\n' : '\n'), important: false, }, ]) @@ -396,7 +396,7 @@ describe.each(['Unix', 'Windows'])('Line endings: %s', (lineEndings) => { background-color: red; /* A comment ; */ content: 'Hello, world!'; - }`, + }`.replaceAll(/\r?\n/g, lineEndings === 'Windows' ? '\r\n' : '\n'), important: false, }, { @@ -406,7 +406,7 @@ describe.each(['Unix', 'Windows'])('Line endings: %s', (lineEndings) => { background-color: red; /* A comment } */ content: 'Hello, world!'; - }`, + }`.replaceAll(/\r?\n/g, lineEndings === 'Windows' ? '\r\n' : '\n'), important: false, }, ])