Options are not passed to mdast-util-to-hast
See original GitHub issueInitial 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)
Affected packages and versions
^9.1.0
Link to runnable example
https://codesandbox.io/s/remark-rehype-debug-4cz8v?file=/src/index.js:488-532
Steps to reproduce
Pass a custom handler and see that it’s not used
function link(h, node) {
return h(node, 'a', {href: "/abc"}, [])
}
.use(remarkRehype, null, {handlers: {link}})
Expected behavior
Custom link handler should override default one
Actual behavior
Passed handlers are ignored
Runtime
Node v16
Package manager
npm v6
OS
Linux
Build and bundle tools
Webpack
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
npm:mdast-util-to-hast | Skypack
Helper function for writing custom handlers passed to options.handlers . Pass it h and a parent node (mdast) and it will turn the...
Read more >Is there any way to detect whether an option was passed as a ...
I was thinking to check the parsed arguments against the default arguments, but then the user would not be able to override a...
Read more >shell script - How do I make an option (not argument of the ...
Here the argument of the option is mandatory so I am getting this error. How can I make the option mandatory so that...
Read more >Extend Markdown Parser To Render Custom Code Blocks
While not enabling all markdown extensions e.g. tables custom linebreak behaviour ... All options except for sanitize and handlers are passed to hastutil....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @wooorm
I just added support for an explicit
destination: null
to solve your expectation!