lib: add Render::render_{event, prologue, epilogue}
derive push/write automatically from these
This commit is contained in:
parent
e506fffed8
commit
e8503e28fd
8 changed files with 73 additions and 48 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,9 @@ macro_rules! suite_test {
|
|||
let expected = $expected;
|
||||
let p = jotdown::Parser::new(src);
|
||||
let mut actual = String::new();
|
||||
jotdown::html::Renderer.push(p, &mut actual).unwrap();
|
||||
jotdown::html::Renderer::default()
|
||||
.push(p, &mut actual)
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
actual.trim(),
|
||||
expected.trim(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue