Skip to main content

render_djot_inline

Function render_djot_inline 

Source
pub fn render_djot_inline<F: OutputFormat<Output = String>>(
    src: &str,
    fmt: &F,
) -> String
Expand description

Render djot inline markup and map events to OutputFormat methods.

Parses the input as djot inline markup and transforms container and text events into formatted output. Block-level containers are collapsed to their text content. Inline containers (emphasis, strong, links, etc.) are rendered using the format’s methods.

§Arguments

  • src - Input string with djot inline markup
  • fmt - OutputFormat implementation for rendering

§Returns

Formatted string with markup applied according to the OutputFormat’s methods