aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_utils (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-10-11Refactor to use a bunch of `into`Libravatar Titus Wormer2-13/+9
2022-10-11Refactor some hidden internalsLibravatar Titus Wormer2-8/+8
2022-10-11Add support for proper positional info in swc treeLibravatar Titus Wormer9-248/+565
* Fix some positional info in SWC error messages * Add positional info in `to_document` on duplicate layouts * Add support for `path` on `Program` (`to_swc`, `to_document`, `jsx_rewrite`), for the path of a file on disk * Add support for `development` to `jsx-rewrite`, which when defined will embed info on where tags were written into the runtime code when they are not passed * Refactor to move some utilities to `micromark_swc_utils.rs`, `swc_utils.rs`
2022-10-06Refactor to improve `to_hast` internalsLibravatar Titus Wormer2-828/+624
2022-10-06Refactor to share identifier methodsLibravatar Titus Wormer1-15/+5
2022-10-05Add support for form feeds as html whitespaceLibravatar Titus Wormer1-2/+1
2022-10-05Add support for rewriting JSXLibravatar Titus Wormer4-2/+1194
2022-10-04Refactor to share a test utilityLibravatar Titus Wormer3-27/+64
2022-10-03Add support for creating a component, using layoutLibravatar Titus Wormer3-2/+653
2022-09-30Add support for turning hast into swcLibravatar Titus Wormer5-51/+836
2022-09-29Add note on future ideaLibravatar Titus Wormer1-0/+4
2022-09-28Add support for turning mdast to hastLibravatar Titus Wormer4-245/+1986
2022-09-19Add support for parsing MDX ESM, expressionsLibravatar Titus Wormer1-0/+245
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).