Skip to content

Commit eed2319

Browse files
committed
Work around candidate parsing bug
1 parent 861e636 commit eed2319

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/tailwindcss-language-service/src/util/getVariantsFromClassName.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ export function getVariantsFromClassName(
6363
for (let part of parts) {
6464
if (!isValidVariant(part)) break
6565

66+
// We might see something like `bg-[` and consider it valid before v4.1.16
67+
// This is a fix for that behavior
68+
if (part.endsWith('-[')) break
69+
6670
variants.add(part)
6771
offset += part.length + state.separator!.length
6872
}

0 commit comments

Comments
 (0)