https://www.ryanfiller.com/blog/remark-and-rehype-plugins
To paraphrase heavily from the
mdsvex
docs, the source file is first parsed into a Markdown AST (MDAST), whereremark
plugins run. Then the data is converted into an HTML AST (HAST), whererehype
plugins run. Finally the data is converted (stringified) into valid markup for the browser.