Skip to content

Commit 59c7e32

Browse files
authored
Ignore "!*" in templates (#4816)
Fixes #4746
1 parent fdfecf3 commit 59c7e32

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/jit/lib/expandTailwindAtRules.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function getClassCandidates(content, extractor, contentMatchCache, candidates, s
8585
candidates.add(match)
8686
}
8787
} else {
88-
let extractorMatches = extractor(line)
88+
let extractorMatches = extractor(line).filter((s) => s !== '!*')
8989
let lineMatchesSet = new Set(extractorMatches)
9090

9191
for (let match of lineMatchesSet) {

tests/jit/important-modifier-prefix.test.html

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- The string "!*" can cause problems if we don't handle it, let's include it -->
2+
<div class="!*"></div>
13
<div class="!tw-container"></div>
24
<div class="!tw-font-bold"></div>
35
<div class="hover:!tw-text-center"></div>

0 commit comments

Comments
 (0)