Skip to content

Commit

Permalink
Ignore "!*" in templates (#4816)
Browse files Browse the repository at this point in the history
Fixes #4746
  • Loading branch information
adamwathan committed Jun 26, 2021
1 parent fdfecf3 commit 59c7e32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/jit/lib/expandTailwindAtRules.js
Expand Up @@ -85,7 +85,7 @@ function getClassCandidates(content, extractor, contentMatchCache, candidates, s
candidates.add(match)
}
} else {
let extractorMatches = extractor(line)
let extractorMatches = extractor(line).filter((s) => s !== '!*')
let lineMatchesSet = new Set(extractorMatches)

for (let match of lineMatchesSet) {
Expand Down
2 changes: 2 additions & 0 deletions tests/jit/important-modifier-prefix.test.html
@@ -1,3 +1,5 @@
<!-- The string "!*" can cause problems if we don't handle it, let's include it -->
<div class="!*"></div>
<div class="!tw-container"></div>
<div class="!tw-font-bold"></div>
<div class="hover:!tw-text-center"></div>
Expand Down

0 comments on commit 59c7e32

Please sign in to comment.