Skip to content

Name the tailwind and trash class-filter predicates - #175

Merged
DavertMik merged 2 commits into
mainfrom
advisor/035-class-filter-predicates
Sep 2, 2026
Merged

Name the tailwind and trash class-filter predicates#175
DavertMik merged 2 commits into
mainfrom
advisor/035-class-filter-predicates

Conversation

@DavertMik

Copy link
Copy Markdown
Contributor

The multi-step class-filter lambdas were the last real duplication in the HTML cleanup chains — TAILWIND_CLASS_PATTERNS.some(p => p.test(cls)) written three times and the trash-regex test twice via two local aliases. They are now two named predicates (isTailwindClass, isTrashClass) exported next to the constants they wrap. Every .filter() chain keeps its exact steps and order — the per-site differences (the minimal-UI snapshot filters trash/dunder classes; cleanElement deliberately does not) are intentional and stay visible as written.

Outputs are byte-identical — the snapshot-heavy suites pass with zero assertion edits (1225 unit tests, 0 fail).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Jz7wTcYsy68jUUjcWttd1B

…L snapshots and the diff's container selectors

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@DavertMik
DavertMik merged commit 83d513e into main Sep 2, 2026
2 checks passed
@DavertMik
DavertMik deleted the advisor/035-class-filter-predicates branch September 2, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants