Skip to content

Commit 375d0d9

Browse files
tizu69thecrypticace
authored andcommitted
Fix --value([*]) throwing error
1 parent a748a1f commit 375d0d9

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
@@ -386,6 +386,14 @@ function createVirtualCssDocument(textDocument: TextDocument): TextDocument {
386386
)
387387
.replace(/(?<=\b(?:theme|config)\([^)]*)[.[\]]/g, '_')
388388

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

0 commit comments

Comments
 (0)