fix: bound document nesting and escape generated urls
This commit is contained in:
parent
c29364d8e0
commit
49a63503d0
10 changed files with 276 additions and 19 deletions
|
|
@ -80,7 +80,7 @@ mod tests {
|
|||
use super::*;
|
||||
|
||||
fn render(renderer: &dyn Renderer, markdown: &str) -> String {
|
||||
let doc = parse::markdown(markdown);
|
||||
let doc = parse::markdown(markdown).unwrap();
|
||||
let settings = PageSettings::default();
|
||||
let ctx = RenderCtx { url: "/x", title: "The Title", settings: &settings, width: None };
|
||||
String::from_utf8(renderer.render(&doc, &ctx).unwrap().body).unwrap()
|
||||
|
|
@ -225,7 +225,7 @@ mod deck_tests {
|
|||
/// Parse, then turn `<!-- card X -->` comments into dividers, which is what
|
||||
/// `directives::apply` does for a real request.
|
||||
pub fn with_card_breaks(markdown: &str) -> Doc {
|
||||
let mut doc = parse::markdown(markdown);
|
||||
let mut doc = parse::markdown(markdown).unwrap();
|
||||
doc.blocks = doc
|
||||
.blocks
|
||||
.into_iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue