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

@ -7,6 +7,8 @@ use jotdown::Render;
pub fn jotdown_render(djot: &str) -> String {
let events = jotdown::Parser::new(djot);
let mut html = String::new();
jotdown::html::Renderer.push(events, &mut html).unwrap();
jotdown::html::Renderer::default()
.push(events, &mut html)
.unwrap();
html
}