pub fn render_to_html(src: &str, theme: Theme, dense: bool) -> RenderResultExpand description
Render a markdown source string to a complete HTML document.
Pipeline:
- Extract frontmatter (title, subtitle, mode, toc)
- Parse body into comrak AST
- Walk AST — transform directive HTML comments into layout HTML
- Render AST to HTML with syntax highlighting
- Wrap in themed CSS + header