Skip to main content

marco_core/render/
mod.rs

1// HTML renderer: AST → HTML for WebKit6 preview
2
3pub mod base_css;
4pub mod code_languages;
5pub mod diagram;
6pub mod markdown;
7pub mod math;
8pub mod options;
9pub mod plarform_mentions;
10pub mod preview_document;
11pub mod syntect_highlighter;
12
13pub use code_languages::*;
14pub use markdown::*;
15pub use options::*;
16pub use preview_document::*;
17pub use syntect_highlighter::*;
18
19use crate::parser::Document;
20
21// Main render entry point
22pub fn render(
23    document: &Document,
24    options: &RenderOptions,
25) -> Result<String, Box<dyn std::error::Error>> {
26    log::info!("Starting HTML render");
27    let html = render_html(document, options)?;
28    log::debug!("Generated {} bytes of HTML", html.len());
29    Ok(html)
30}