Skip to main content

render_afm

Function render_afm 

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

Render afm source to IR + HTML + diagnostics.

options is decoded as { aozoraEnabled?: boolean, sourceLineAnchors?: boolean }. Both default to the values from Options::afm_default() (aozora on, anchors off).

ยงErrors

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