Expand description
Markdown parser for Terraphim knowledge-graph documents.
Converts markdown files into typed terraphim_types::Document values,
extracting titles, tags, and body text for indexing and search.
Re-exports§
pub use chunk::ContentChunk;pub use chunk::chunk_by_headings;pub use heading::HeadingNode;pub use heading::HeadingTree;pub use heading::MatchStrategy;pub use heading::SectionConfig;pub use heading::SectionPattern;pub use heading::SectionType;pub use heading::build_heading_tree;pub use heading::classify_sections;pub use limits::AstStats;pub use limits::LimitKind;pub use limits::ParseLimits;pub use limits::ParseLimitsError;pub use limits::measure_ast;
Modules§
Structs§
- Block
- Normalized
Markdown - Parse
Diagnostic - A recovered-parse diagnostic describing loss, a parse failure, or a limit violation.
- Parse
Report - The outcome of a recovering parse: whatever output could be produced, explicit diagnostics, and whether the output is complete (loss-free).
Enums§
Constants§
Functions§
- blocks_
to_ documents - Convert extracted blocks into Terraphim
Documents so downstream graph tooling can be reused. - ensure_
terraphim_ block_ ids - Ensure every list item and paragraph has a stable Terraphim block id.
- extract_
first_ heading - Extract the first H1 heading from markdown content using AST parsing.
- normalize_
markdown - Normalize markdown into canonical Terraphim form and return the extracted blocks.
- parse_
recovering - Recovering parsing: bounded, and loss-reporting instead of fail-closed.
- parse_
strict - Strict parsing: bounded, lossless, and fail-closed.