pub fn render_html(nodes: &[Node], options: &RenderOptions) -> StringExpand description
Renders an AST to an HTML fragment (<div class="hl-receipt">). Include
STYLESHEET once on the page, or use render_html_document.
All receipt text is escaped, so the output is safe to insert into a page.
use hardless_escpos::parse;
use hardless_render::{render_html, RenderOptions};
let html = render_html(&parse(b"<b>Hi</b>\n"), &RenderOptions::default());
assert!(html.contains("<b>Hi</b>"));