mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 14:16:28 +03:00
removeSelectorAt walked backward to find the rule prelude and stopped at any '>', added so the walk would not escape past the <style> open tag. That same character is the CSS child combinator, so pruning one unused selector from a list like '.wrap > .orphan, .orphan' cut the prelude mid-list; when every remaining fragment equaled the flagged selector, the whole-rule branch then deleted from the cut point and left a dangling '.wrap >' in source. A '>' now bounds the walk only when it actually closes a <style ...> tag; combinators are walked through. Regression tests cover a mid-list combinator prune and the dangling- fragment shape (verified failing on the previous code). AI-assisted (Claude Code). Co-Authored-By: Claude Code <noreply@anthropic.com>