Skip to content

fix: preserve iteration when replacing all selector children - #374

Open
Aschenbath wants to merge 1 commit into
postcss:mainfrom
Aschenbath:fix/50-selector-clear-iteration-20261125-42bb
Open

Aschenbath wants to merge 1 commit into
postcss:mainfrom
Aschenbath:fix/50-selector-clear-iteration-20261125-42bb

Conversation

@Aschenbath

Copy link
Copy Markdown
Contributor

Clearing a selector during each() and then appending a replacement currently skips the replacement, although removing the children individually visits it. Reset active cursors when removeAll() empties the container so its next iteration starts at the first replacement. The empty() alias receives the same behavior.

The regression fails for both methods on the unchanged baseline. Validation: npm test (lint, declaration types, and full tests with coverage thresholds), changed-file formatting, and git diff --check.

AI assistance: implemented and tested with OpenAI Codex.

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