Skip to main content

generate_html_wasm

Function generate_html_wasm 

Source
pub fn generate_html_wasm(markdown: &str) -> Result<String, JsValue>
Expand description

Render Markdown to an accessible HTML fragment.

This is the simplest WASM entry point — no configuration, the pipeline runs with HtmlConfig::default (ARIA on, TOC off, JSON-LD off, no full-document wrap).

§Errors

Returns a JsValue carrying the crate::error::HtmlError display string when the underlying Markdown render fails. wasm-bindgen materialises this on the JS side as a thrown JavaScript Error.