Fix `InvalidTailwindDirective` in `notSemicolonLanguages` with CRLF file endings (#723)

* Fix InvalidTailwindDirective in notSemicolonLanguages with CRLF file endings

* Fix regex

---------

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
master
Leonard Grosoli 2023-03-06 15:45:23 +01:00 committed by GitHub
parent 5376ee1e7a
commit 3aafffefda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ export function getInvalidTailwindDirectiveDiagnostics(
(state.editor && (state.editor &&
notSemicolonLanguages.includes(state.editor.userLanguages[document.languageId])) notSemicolonLanguages.includes(state.editor.userLanguages[document.languageId]))
) { ) {
regex = /(?:\s|^)@tailwind\s+(?<value>[^\n]+)/g regex = /(?:\s|^)@tailwind\s+(?<value>[^\r\n]+)/g
} else { } else {
regex = /(?:\s|^)@tailwind\s+(?<value>[^;]+)/g regex = /(?:\s|^)@tailwind\s+(?<value>[^;]+)/g
} }