Parsing and Stringifying
parseMarkdown
Parse markdown string into an mdast AST.stringifyMarkdown
Stringify an mdast AST back to markdown.Text Extraction
toPlainText
Extract plain text from an AST (strips all formatting).markdownToPlainText
Extract plain text from a markdown string.AST Node Builders
Helper functions for creating mdast nodes programmatically.root
Create a root node (top-level AST container).paragraph
Create a paragraph node.text
Create a text node.strong
Create a strong (bold) node.emphasis
Create an emphasis (italic) node.strikethrough
Create a delete (strikethrough) node.inlineCode
Create an inline code node.codeBlock
Create a code block node.link
Create a link node.blockquote
Create a blockquote node.AST Manipulation
walkAst
Walk the AST and transform nodes.- Return the node unchanged
- Return a modified node
- Return
nullto remove the node