Expand description
§markplus_core
Universal Markdown → AST (JSON) compiler for the MarkPlus ecosystem.
§What this crate does
Parses a Markdown document (with optional YAML frontmatter) into a structured, versioned JSON AST. It does not render HTML or Typst — that is the responsibility of a downstream renderer that consumes the AST.
§Output shape
{
"schema": 1,
"meta": { "title": "...", "tags": ["..."] },
"ast": [
{ "t": "heading", "level": 1, "children": [{ "t": "text", "text": "Hi" }] },
{ "t": "fenced", "name": "mermaid", "attrs": {}, "raw": "graph TD\nA-->B" }
]
}Re-exports§
pub use json::read_and_validate_asset;pub use json::read_asset_json;pub use json::validate_asset_json_str;pub use csv::CsvReadOptions;pub use csv::read_csv_as_table_ast;pub use code::is_known_code_extension;pub use code::parse_code_to_fenced_ast;pub use code::read_code_as_fenced_ast;pub use json::parse_json_data_to_ast;pub use json::read_json_data_as_ast;pub use mermaid::parse_mermaid_to_fenced_ast;pub use mermaid::read_mermaid_as_fenced_ast;
Modules§
- ast
- Stack-based Markdown AST builder.
- code
- Source code parsing logic converting code strings into fenced AST nodes.
- config
- Parser configuration and pulldown-cmark option flags.
- csv
- CSV parsing logic converting flat csv lines into table AST nodes.
- event_
filter - Frontmatter extraction layer.
- json
- Wire format for the compiled site asset (
note_XXX.json). - mermaid
- Mermaid logic converting .mmd definitions to SVG renderable fenced nodes.
Enums§
- Compile
Error - Errors that can occur while compiling Markdown into a
SiteAsset.
Functions§
- parse_
body - Parse a pre-stripped Markdown body (no frontmatter) into an AST array.
- parse_
document - Parse a raw
.mdsource (may contain YAML frontmatter) into aSiteAssetcontaining parsed metadata and the full MarkPlus AST. - strip_
frontmatter - Return the Markdown body with a leading YAML frontmatter block removed.