Crate mdxjs

Source
Expand description

Public API of mdxjs-rs.

This module exposes primarily compile().

Modules§

hast
HTML syntax tree: hast.

Structs§

MdxConstructs
Like Constructs from markdown-rs.
MdxParseOptions
Like ParseOptions from markdown-rs.
Options
Configuration (optional).

Enums§

JsxRuntime
JSX runtimes (default: JsxRuntime::Automatic).

Functions§

compile
Turn MDX into JavaScript.
hast_util_to_swc
Compile hast into SWC’s ES AST.
mdast_util_from_mdx
Turn MDX into a syntax tree.
mdast_util_to_hast
Turn mdast into hast.
mdx_plugin_recma_document
Wrap the SWC ES AST nodes coming from hast into a whole document.
mdx_plugin_recma_jsx_rewrite
Rewrite JSX in an MDX file so that components can be passed in and provided. Also compiles JSX to function calls unless options.jsx is true.