Node modelΒΆ
Understand the common AST shape and node groups used by Wenmode rules.
AST examples in this reference use JSON-style output from root.to_ast(). The
top-level shape is always:
{
"type": "root",
"children": []
}
Directive HTML can be replaced by registering directive renderers. Raw HTML is
escaped by the default HTMLRenderer unless you construct it with
HTMLRenderer(escape=False).
Wenmode nodes are mdast-compatible data objects. Core Markdown nodes use mdast-style names and fields, and extensions follow the same conventions with explicit node types.
Node group |
Node types |
|---|---|
Document and containers |
|
Literals |
|
Formatting |
|
Links and media |
|
GFM and extensions |
|
Wenmode extensions |
|
Directives |
|