Skip to content

scan: refuse a candidate whose modifier opens on - or _ - #772

Merged
samoht merged 3 commits into
misc-last-resortfrom
scanner-modifier-boundary
Sep 14, 2026
Merged

samoht merged 3 commits into
misc-last-resortfrom
scanner-modifier-boundary

Conversation

@samoht

@samoht samoht commented Sep 13, 2026

Copy link
Copy Markdown
Owner

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 aspect-[16/9], bg-[url(a/b.png)] and bg-cyan-400/(--alpha) are unaffected. Zero classes in the 4,825-class corpus are touched. Follows #771.

@samoht
samoht added this pull request to stack #728 September 13, 2026 19:25
@samoht
samoht force-pushed the scanner-modifier-boundary branch from 3a28ee0 to 9ae79b4 Compare September 13, 2026 19:26
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
samoht force-pushed the scanner-modifier-boundary branch from 9ae79b4 to 1c42b18 Compare September 13, 2026 20:14
@samoht
samoht merged commit 3632d69 into main Sep 14, 2026
3 checks passed
@samoht
samoht deleted the scanner-modifier-boundary branch September 14, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant