Skip to main content

Crate base_markdown

Crate base_markdown 

Source
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.
CodeFence
Opening fence metadata, matching Markly’s Node::Fence structure.
CompileOptions
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.
DocumentEvents
A zero-allocation pull traversal over the arena’s parent/child/sibling links.
DocumentNode
A semantic AST node. Child and sibling lists use arena indices, not heap objects.
EventHtmlRenderer
Render semantic events directly into a caller-owned writer.
EventParser
A pull producer of resolved semantic events. Preparation records block structure; inline syntax is scanned only when its containing block is consumed.
HeadingEntry
A heading’s stable node ID, plain text and unique HTML anchor.
HeadingOptions
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.
ParseOptions
Configuration that describes how to parse from markdown.

Enums§

AlignKind
Alignment of phrasing content.
BuildProgress
The result of one bounded AST-building operation.
LineEnding
Type of line endings in markdown.
NodeSyntax
Source formatting that is useful for Markdown serialization but unnecessary for HTML.
ReferenceKind
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.