From 5403261e8213f68633a09fc3e9bc2e6e2cd777b2 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 18 Jul 2022 16:31:14 +0200 Subject: Add support for turning off constructs --- tests/misc_dangerous_html.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/misc_dangerous_html.rs') diff --git a/tests/misc_dangerous_html.rs b/tests/misc_dangerous_html.rs index 76031c1..5559774 100644 --- a/tests/misc_dangerous_html.rs +++ b/tests/misc_dangerous_html.rs @@ -1,14 +1,14 @@ extern crate micromark; use micromark::{micromark, micromark_with_options, Options}; -const DANGER: &Options = &Options { - allow_dangerous_html: true, - allow_dangerous_protocol: true, - default_line_ending: None, -}; - #[test] fn dangerous_html() { + let danger = &Options { + allow_dangerous_html: true, + allow_dangerous_protocol: true, + ..Options::default() + }; + assert_eq!( micromark(""), "<x>", @@ -22,7 +22,7 @@ fn dangerous_html() { ); assert_eq!( - micromark_with_options("", DANGER), + micromark_with_options("", danger), "", "should be unsafe w/ `allowDangerousHtml`" ); -- cgit