lib: add Render::render_{event, prologue, epilogue}

derive push/write automatically from these
This commit is contained in:
Noah Hellman 2023-03-19 18:44:58 +01:00
parent e506fffed8
commit e8503e28fd
8 changed files with 73 additions and 48 deletions

View file

@ -19,7 +19,9 @@ pub fn html(data: &[u8]) {
if !s.contains("=html") {
let p = jotdown::Parser::new(s);
let mut html = "<!DOCTYPE html>\n".to_string();
jotdown::html::Renderer.push(p, &mut html).unwrap();
jotdown::html::Renderer::default()
.push(p, &mut html)
.unwrap();
validate_html(&html);
}
}