html_generator::performance

Function generate_html

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

Synchronously generates HTML from Markdown content.

Provides a simple, synchronous interface for Markdown to HTML conversion when asynchronous processing isn’t required.

§Arguments

  • markdown - Markdown content to convert to HTML

§Returns

Returns the generated HTML content if successful.

§Examples

let markdown = "# Hello\n\nThis is a test.";
let html = generate_html(markdown)?;
println!("Generated HTML length: {}", html.len());