scan: refuse a candidate whose modifier opens on - or _ - #772
Merged
Merged
Conversation
samoht
added this pull request to stack #728
September 13, 2026 19:25
samoht
force-pushed
the
scanner-modifier-boundary
branch
from
September 13, 2026 19:26
3a28ee0 to
9ae79b4
Compare
A candidate whose /modifier opens on - or _ is no candidate, and the whole candidate is refused rather than truncated. Written as an assertion it fails on the parent commit, where tw scanned one Tailwind does not.
Tailwind's extractor refuses it, and refuses the whole candidate rather than truncating: the CLI emits nothing for bg-red-500/-2, not the truncated bg-red-500. tw read one where Tailwind reads none, so a sheet tw built carried rules the author's own toolchain never writes. Only a / the utility itself carries counts, so one inside a bracket or a paren group is the value's: aspect-[16/9], bg-[url(a/b.png)] and bg-cyan-400/(--alpha) are unaffected.
samoht
force-pushed
the
scanner-modifier-boundary
branch
from
September 13, 2026 20:14
9ae79b4 to
1c42b18
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tailwind's extractor refuses it, and refuses the whole candidate rather than truncating: the CLI emits nothing for
bg-red-500/-2, not the truncatedbg-red-500. tw read one where Tailwind reads none, so a sheet tw built carried rules the author's own toolchain never writes.Only a
/the utility itself carries counts, soaspect-[16/9],bg-[url(a/b.png)]andbg-cyan-400/(--alpha)are unaffected. Zero classes in the 4,825-class corpus are touched. Follows #771.