From 69e2db6efadf2d15514a8947f48acaf174024a57 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 4 Oct 2023 09:33:44 +0200 Subject: Upgrade to comrak 0.19 --- testing/tests/markdown.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'testing/tests') diff --git a/testing/tests/markdown.rs b/testing/tests/markdown.rs index e0150f6..75163c9 100644 --- a/testing/tests/markdown.rs +++ b/testing/tests/markdown.rs @@ -1,7 +1,7 @@ #![cfg(feature = "markdown")] use askama::Template; -use comrak::{ComrakOptions, ComrakRenderOptions}; +use comrak::Options; #[derive(Template)] #[template(source = "{{before}}{{content|markdown}}{{after}}", ext = "html")] @@ -42,22 +42,19 @@ struct MarkdownWithOptionsTemplate<'a> { before: &'a str, after: &'a str, content: &'a str, - options: &'a ComrakOptions, + options: &'a Options, } #[test] fn test_markdown_with_options() { + let mut options = Options::default(); + options.render.unsafe_ = true; + let s = MarkdownWithOptionsTemplate { before: "before", after: "after", content: "* 1\n* \n* 3", - options: &ComrakOptions { - render: ComrakRenderOptions { - unsafe_: true, - ..Default::default() - }, - ..Default::default() - }, + options: &options, }; assert_eq!( s.render().unwrap(), -- cgit