diff --git a/packages/tailwindcss-language-service/src/diagnostics/getInvalidTailwindDirectiveDiagnostics.ts b/packages/tailwindcss-language-service/src/diagnostics/getInvalidTailwindDirectiveDiagnostics.ts index e177db75385936554bb26eb62607555476fbc795..05526ff9d9ad246c8cec793c09dc8c6c991ad52e 100644 --- a/packages/tailwindcss-language-service/src/diagnostics/getInvalidTailwindDirectiveDiagnostics.ts +++ b/packages/tailwindcss-language-service/src/diagnostics/getInvalidTailwindDirectiveDiagnostics.ts @@ -27,23 +27,11 @@ if (!boundaries) return [] ranges.push(...boundaries.css) } - let notSemicolonLanguages = ['sass', 'sugarss', 'stylus'] - let regex: RegExp - if ( - notSemicolonLanguages.includes(document.languageId) || - (state.editor && - notSemicolonLanguages.includes(state.editor.userLanguages[document.languageId])) - ) { - regex = /(?:\s|^)@tailwind\s+(?[^\n]+)/g - } else { - regex = /(?:\s|^)@tailwind\s+(?[^;]+)/g - } - let hasVariantsDirective = state.jit && semver.gte(state.version, '2.1.99') ranges.forEach((range) => { let text = document.getText(range) - let matches = findAll(regex, text) + let matches = findAll(/(?:\s|^)@tailwind\s+(?[^;]+)/g, text) let valid = [ 'utilities',