Expand description
A pull parser, source-backed document AST, and shared HTML writer.
Use to_html for direct rendering, EventParser for custom pull consumers,
and Document::parse when inspecting or editing a syntax tree. Documents
traverse the same semantic event contract as the parser. to_markdown
serializes documents; render_events accepts parser or document events.
Re-exports§
pub use markdown::to_markdown_node;pub use markdown::to_markdown;pub use markdown::to_markdown_with_options;pub use markdown::IndentOptions;pub use markdown::LineWrapping;pub use markdown::Options as MarkdownOptions;
Modules§
- markdown
- API.
- message
- Diagnostics use the same byte offsets as documents and events.
- stream
- The shared pull-based semantic event contract.
Structs§
- AstBuilder
- An incremental consumer that pulls events directly into an arena.
- Children
- A stack-free iterator over a node’s direct children.
- Code
Fence - Opening fence metadata, matching Markly’s
Node::Fencestructure. - Compile
Options - Configuration that describes how to compile to HTML.
- Constructs
- Control which constructs are enabled.
- Descendants
- A stack-free preorder traversal, including its starting node.
- Document
- An owned source buffer and a direct semantic AST.
- Document
Events - A zero-allocation pull traversal over the arena’s parent/child/sibling links.
- Document
Node - A semantic AST node. Child and sibling lists use arena indices, not heap objects.
- Event
Html Renderer - Render semantic events directly into a caller-owned writer.
- Event
Parser - A pull producer of resolved semantic events. Preparation records block structure; inline syntax is scanned only when its containing block is consumed.
- Heading
Entry - A heading’s stable node ID, plain text and unique HTML anchor.
- Heading
Options - Heading levels to include when building a table of contents.
- NodeId
- A stable index into a document’s contiguous node arena.
- Options
- Configuration that describes how to parse from markdown and compile to HTML.
- Parse
Options - Configuration that describes how to parse from markdown.
Enums§
- Align
Kind - Alignment of phrasing content.
- Build
Progress - The result of one bounded AST-building operation.
- Line
Ending - Type of line endings in markdown.
- Node
Syntax - Source formatting that is useful for Markdown serialization but unnecessary for HTML.
- Reference
Kind - Explicitness of a reference.
Functions§
- render_
events - Render events with the shared HTML writer.
- to_html
- Turn markdown into HTML.
- to_
html_ with_ options - Turn markdown into HTML, with configuration.