How the rendering flow works in svelte-exmarkdown
mainThe library is built on top of the unified ecosystem. The rendering process follows this pipeline:
- Markdown String is parsed by
remark-parseinto an mdast (Markdown Abstract Syntax Tree). - remarkPlugins process the
mdast. remark-rehypeconverts themdastinto a hast (Hypertext Abstract Syntax Tree).- rehypePlugins process the
hast. - hast-component-mapping maps the
hastnodes to specific SvelteComponents for final rendering.
Because it uses unified, you can use any standard remark or rehype plugins.