Skip to content

Add support for custom handlers #26

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

Merged
merged 3 commits into from
Feb 14, 2017
Merged

Add support for custom handlers #26

merged 3 commits into from
Feb 14, 2017

Conversation

sethvincent
Copy link
Contributor

Initial attempt!

This seems like a bit of a hack. Because of the recursive nature of the all and one functions it's a bit tricky to pass the options through.

Very open to suggestions!

@wooorm
Copy link
Member

wooorm commented Feb 13, 2017

How about we set options.handlers on h in the toMDAST function?

h.handlers = xtend(handlers, options.handlers);

...and use h.handlers in one instead of require('./handlers')?

@sethvincent
Copy link
Contributor Author

Oh, yeah just like h.augment! Thanks, I'll update this.

@wooorm wooorm merged commit 1294628 into master Feb 14, 2017
@wooorm wooorm deleted the handlers-option branch February 14, 2017 11:16
@wooorm
Copy link
Member

wooorm commented Feb 14, 2017

Awesome! 👍

@wooorm wooorm changed the title pass handlers as option Pass handlers as option Aug 12, 2019
@wooorm wooorm changed the title Pass handlers as option Add support for custom handlers Aug 12, 2019
@wooorm wooorm added ⛵️ status/released 🗄 area/interface This affects the public interface 🦋 type/enhancement This is great to have 🧒 semver/minor This is backwards-compatible change labels Aug 12, 2019
@wooorm wooorm added the 💪 phase/solved Post is done label Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface 💪 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