Skip to main content

Crate oxydemark

Crate oxydemark 

Source
Expand description

OxydeMark: extensible Markdown pipelines powered by Rust.

The crate root re-exports the stable public Rust surface (OMEP-0008 / OMEP-0010), including Meta which originates in rushdown and is re-exported so the surface is self-contained. Everything else in the crate (the extensions, html_render, slug, and ast internal helpers, the thread-local parser/renderer caches, and the arena-conversion functions) is private and may change without notice.

The optional python cargo feature additionally builds the PyO3 extension module oxydemark._core. Without it, the crate has no dependency on PyO3, so downstream Rust consumers can use the API below without requiring Python.

§Examples

let ast = oxydemark::parse("# Hello **world**");
assert_eq!(ast.kind, "document");

let html = oxydemark::markdown_to_html("# Hello").unwrap();
assert!(html.contains("<h1"));

Structs§

AstNode
A Python-friendly AST node representing a Markdown element.
Heading
A document heading, used both as a flat entry of ParseResult::headings and as a node of the nested ParseResult::toc tree (OMEP-0010).
ParseResult
The result of crate::parse_document: the AST tree plus structured, typed document metadata.

Enums§

Meta
Typed metadata value (YAML scalars, sequences and mappings).
OxydeError
Errors that can occur while processing Markdown with OxydeMark.

Functions§

extract_summary
Extract the summary (excerpt) preceding a <!-- more --> delimiter.
markdown_to_html
Convert Markdown directly to HTML (fast path, no AST exposure).
parse
Parse Markdown input into an AST node tree.
parse_document
Parse Markdown input and compute structured, typed document metadata.
render_ast
Render an AstNode tree to an HTML string.
slugify
Generate a URL-friendly anchor slug from text.