Skip to content

New node names and format for import/export in mdx 2.0.0.next.9 #1500

Answered by wooorm
iAdramelk asked this question in Q&A
Discussion options

You must be logged in to vote

It’s not an esprima AST: it’s an estree, used by acorn/eslint/and much of the ecosystem.
mdxjsEsm also have a data.estree field of that AST.
Those ASTs are used here so that we don’t have to parse the input again. And so that you don‘t have to deal with escaping issues.

See https://github.com/remcohaszing/remark-mdx-images and https://github.com/remcohaszing/remark-mdx-frontmatter (the latter is closes to what you’re doing)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@wooorm
Comment options

@iAdramelk
Comment options

Answer selected by iAdramelk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants