mdast-util-mdi
v2.0.21
Published
mdast serialization extension for Rust-owned MDI 2.0 nodes
Readme
mdast-util-mdi
Serialization extension and TypeScript node definitions for MDI-flavoured
mdast trees. It lets an existing unified pipeline write MDI nodes back to
canonical MDI source with mdast-util-to-markdown.
Install
npm install mdast-util-mdi mdast-util-to-markdownUsage
import { toMarkdown } from "mdast-util-to-markdown";
import { mdiToMarkdown } from "mdast-util-mdi";
const source = toMarkdown(
{ type: "root", children: [{ type: "paragraph", children: [{ type: "mdiTcy", value: "12" }] }] },
{ extensions: [mdiToMarkdown()] },
);
// ^12^\nThis package does not parse MDI source and contains no tokenizer, grammar
tables, delimiter matching, or literal-fallback rules. Parse complete source
with @illusions-lab/mdi;
Rust remains the sole executable syntax authority.
Part of the MDI monorepo. See the architecture documentation for ownership and wire-contract details.
