Skip to main content

render_to_html

Function render_to_html 

Source
pub fn render_to_html(src: &str, theme: Theme, dense: bool) -> RenderResult
Expand description

Render a markdown source string to a complete HTML document.

Pipeline:

  1. Extract frontmatter (title, subtitle, mode, toc)
  2. Parse body into comrak AST
  3. Walk AST — transform directive HTML comments into layout HTML
  4. Render AST to HTML with syntax highlighting
  5. Wrap in themed CSS + header