Something went wrong. Try again.
Markdown parser fork with extended syntax for personal use.
Something went wrong. Try again.
Add support for parsing MDX ESM, expressions master
This commit adds support for hooks that lets a user integrate another parser with `micromark-rs`, to parse ESM and expressions according to a particular grammar (such as a programming language, typically JavaScript). For an example integrating with SWC, see `tests/test_utils/mod.rs`. The integration occurs with two functions passed in `options`: `mdx_expression_parse` and `mdx_esm_parse`. The can signal back to micromark when they are successful, whether there is an error at the end (in which case micromark will try to parse more), or whether there is a syntax error (in which case micromark will crash).
Author Titus Wormer Date (Sep 19, 2022, 9:17 AM UTC) Commit fe618ff6 fe618ff6e38ec0ed4da72a3935fd9ea64ee1cef5 Parent d4cc03c6 d4cc03c65a9657d22c59d50f9b3d38b483362560