Skip to main content

export_html

Function export_html 

Source
pub fn export_html(options: &ExportHtmlOptions) -> String
Expand description

Generate a full HTML document from rendered terminal output.

§Example

use rusty_rich::export::{export_html, ExportHtmlOptions};

let html = export_html(&ExportHtmlOptions {
    code: "[bold red]Hello[/bold red]".into(),
    ..Default::default()
});
std::fs::write("output.html", html).unwrap();