Skip to content

Allow functions to be passed in ignore option #2

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

Conversation

cheapsteak
Copy link

Addresses #1

I would like to be able to tell findAndReplace to ignore certain nodes if they contain a class (like <p class="skip-me"/>), or if their style includes some css property

This PR switches to use unist-util-is, which already handles that

@cheapsteak cheapsteak force-pushed the chang/20/08/w3/ignore-differently branch from ff4a6e3 to 1dd0251 Compare August 20, 2020 02:33
wooorm added a commit to syntax-tree/hast-util-is-element that referenced this pull request Aug 21, 2020
@wooorm
Copy link
Member

wooorm commented Aug 21, 2020

Thanks! As discussed in #1, I do think it makes more sense that this feature lands in hast-util-is-element, so that other tools also benefit from it. I’m currently pushing hast-util-is-element@1.1.0, which will bubble through to this project without the need of any changes here: npm install will update it automatically.

Thanks for your work tho!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants