Skip to main content

render_blocks

Function render_blocks 

Source
pub fn render_blocks(source: &str, options: JsValue) -> Result<JsValue, JsValue>
Expand description

Per-block streaming render.

Returns one {ir, html, sourceLine} entry per top-level comrak block. The afm-obsidian bridge iterates the array and checks its AbortSignal between blocks (ADR-0009 chunked-cancellation strategy).

ยงErrors

Returns Err(JsValue::String) when options cannot be deserialized from JS or when the resulting BlocksResult cannot be serialized back to JS.