Add configuration passthrough for remark-rehype#518
Conversation
Signed-off-by: Marcus Crane <marcus@utf9k.net>
Signed-off-by: Marcus Crane <marcus@utf9k.net>
|
While there are no tests included, I'll note that I've run through a bunch of manual tests with my own site against the latest master branch. Overwriting the defaults work as expected (Dangerous HTML renders by default but can be stubbed out if the user chooses) as well as extra options like footnote overrides working. Probably some tests could be written but I figure if there are none for Remark already, why start now 😉 On a side note, I think there is probably value in exporting remark types through to |
| rehypePlugins?: unknown[]; | ||
|
|
||
| /** Configuration for remark-rehype */ | ||
| remarkRehype?: object; |
There was a problem hiding this comment.
I'd change this option to remarkOptions object for consistency with rehypePlugins and to make clear that it contains the options for rehype, not the remarkRehype option itself.
There was a problem hiding this comment.
Ah ok, I wasn't quite clear on whether remark-rehype was still technically a remark plugin or if it was a standalone thing of sorts but yeah, that makes more sense
|
Hi @marcus-crane
|
|
Ah! That explains a lot re: main being v2 oops. I'll fix that up 🙂 |
|
Closing this until I open a proper PR from the v1 branch |
Description
This change adds the ability to pass configuration from
_config.tsdown toremark-rehype.It can be useful for users who need to customise how footnotes are rendered for Markdown files (such as when using Littlefoot as well as a few other things should they be needed.
Related Issues
Implements #517
Check List
CODE OF CONDUCT
CONTRIBUTING
send multiple pull request.
fmtto fix the code format before commit.CHANGELOG.md.