Replies: 1 comment
-
|
Look further at the underlying tools, micromark and mdast-util-from-markdown |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm completely gobsmacked as to why this works:
https://github.com/remarkjs/remark-gfm/blob/main/lib/index.js
The docs say to just put its function in the array of plugins, and hey presto. And indeed, she works. But I want to understand why she works!
It looks like it's just adding more plugins to some arrays. Those arrays, I've checked, react-markdown has absolutely no knowledge of. So how are those plugins ever about to recieve the markdown they're supposed to parse, and how is react-markdown ever recieving back the html they're expected to output?
This looks like total black magic to me. Can someone please explain what the "flow" is from bare markdown, through these plugins loaded by remark-gfm, back into react-markdown, and into the application?
Beta Was this translation helpful? Give feedback.
All reactions