Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for subsequent zones #4

Merged
merged 1 commit into from
Dec 4, 2023
Merged

Add support for subsequent zones #4

merged 1 commit into from
Dec 4, 2023

Conversation

anatolykopyl
Copy link
Contributor

@anatolykopyl anatolykopyl commented Nov 28, 2023

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

Added handling for multiple uses of zones, one after another.

Since the visitor is removing elements from the AST, it potentially can skip a marker.
As described in unist-util-visit:

When adding or removing previous siblings of node, the Visitor should return a new Index to specify the sibling to traverse after node is traversed.

Added test cases replace-subsequent and remove-subsequent to demonstrate.

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Nov 28, 2023
Copy link
Member

@wooorm wooorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! 😎

@wooorm wooorm changed the title Fixed handling of subsequent zones Add support for subsequent zones Dec 4, 2023
@wooorm wooorm merged commit ec6eacf into syntax-tree:main Dec 4, 2023
5 checks passed

This comment has been minimized.

@wooorm wooorm added 🦋 type/enhancement This is great to have 💪 phase/solved Post is done 🧒 semver/minor This is backwards-compatible change labels Dec 4, 2023
@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Dec 4, 2023
@wooorm
Copy link
Member

wooorm commented Dec 4, 2023

Thank you, released in 6.1.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 phase/solved Post is done 🧒 semver/minor This is backwards-compatible change 🦋 type/enhancement This is great to have
Development

Successfully merging this pull request may close these issues.

2 participants