MDX, the library, uses two syntax trees. The first, MDXAST, represents markdown with embedded JSX, and is a superset of mdast. The second, MDXHAST, represent HTML with embedded JSX, and is a superset of hast.
MDX includes a specification to define the syntax and transpilation. It’s based on the remark/rehype/unified ecosystems to ensure robust parsing and the ability to leverage plugins from within your MDX. This can be leveraged by code formatters, linters, and implementations in other languages created by the community.
The majority of the MDXAST specification is defined by mdast. MDXAST is a superset with the following additional node types:
Any MDX document without those constructs is valid mdast.
For more information, see the MDXAST specification.
MDXAST defines the following additional node types:
inlineCode is there to accurately represent Markdown’s inline code.
For more information, see the MDXHAST specification.Edit this page on GitHub