Skip to content

Commit 8f31445

Browse files
committed
Fix --value([*]) throwing error
1 parent 554cb09 commit 8f31445

File tree

1 file changed

+8
-0
lines changed
  • packages/tailwindcss-language-server/src/language

1 file changed

+8
-0
lines changed

packages/tailwindcss-language-server/src/language/cssServer.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,14 @@ function createVirtualCssDocument(textDocument: TextDocument): TextDocument {
381381
)
382382
.replace(/(?<=\b(?:theme|config)\([^)]*)[.[\]]/g, '_')
383383

384+
.replace(/--value\(\[(\s?)\*\]\)/g, (_match, space) => {
385+
// In this case, space represents a single character space.
386+
// From what I can tell spaces aren't intended, so I limited this to a single matcher.
387+
// This is because Prettier likes to add a space before the `*`.
388+
// FIXME: This is probably unintentional behavior. Consider fixing.
389+
return `--value([${space}_])`
390+
})
391+
384392
return TextDocument.create(
385393
textDocument.uri,
386394
textDocument.languageId,

0 commit comments

Comments
 (0)