TanStack Markdown separates parsing, rendering, and optional docs behavior so each cost can be imported and measured independently.
flowchart LR
M["Markdown source"] --> P["Parser"]
P --> A["Serializable AST"]
A --> H["HTML renderer"]
A --> R["React renderer"]
A --> O["Octane renderer"]
A --> C["JSON or content cache"]
E["Optional extensions"] --> P
E --> H
X["External highlighter"] --> H
X --> R
X --> OThe parser never imports a renderer. The renderers never import a highlighter. The core never imports framework adapters or docs extensions.
The extension API handles the common need to add a docs block or derive metadata without paying for a general compiler pipeline. It intentionally does not implement async plugins, arbitrary virtual files, source maps, JSX evaluation, or cross-format compilation.
Use these hooks to recognize a custom block or inline marker, collect headings, or replace HTML for a node. Choose a unified or MDX stack when you need asynchronous transforms, compiler integration, or executable JSX.
Every release preserves profile fixtures, established CommonMark matches, selected GFM examples, HTML/React/Octane parity, corpus determinism, resilience limits, bundle budgets, documentation coverage, typechecking, and production packaging.