Skip to main content

render_html

Function render_html 

Source
pub fn render_html(source: &str) -> Result<String, ParseError>
Expand description

Render Markdown to HTML using the same parser options the IR uses.

Kept as a public utility for callers that need the same CommonMark rendering policy as document recognition.

Inputs are routed through document-owned source canonicalisation before pulldown sees them (CM §2.1 CR / CRLF → LF, CM §2.3 NUL → U+FFFD), matching what Document::parse does. Callers that need to render raw bytes verbatim should reach for pulldown_cmark::html directly.

§Errors

Returns ParseError if parser execution cannot safely recognise the canonicalised source.