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 --- build.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'build.rs') diff --git a/build.rs b/build.rs index a4947f5..52de3ac 100644 --- a/build.rs +++ b/build.rs @@ -53,7 +53,7 @@ async fn commonmark() { format!("{}\n", parts[1]) }; - let test = format!(" assert_eq!(\n micromark_with_options(r###\"{}\"###, DANGER),\n r###\"{}\"###,\n r###\"{} ({})\"###\n);", input, output, section, number); + let test = format!(" assert_eq!(\n micromark_with_options(\n r###\"{}\"###,\n &danger\n ),\n r###\"{}\"###,\n r###\"{} ({})\"###\n);", input, output, section, number); cases.push(test); @@ -70,15 +70,15 @@ async fn commonmark() { extern crate micromark; use micromark::{{micromark_with_options, Options}}; -const DANGER: &Options = &Options {{ - allow_dangerous_html: true, - allow_dangerous_protocol: true, - default_line_ending: None, -}}; - #[rustfmt::skip] #[test] fn commonmark() {{ + let danger = Options {{ + allow_dangerous_html: true, + allow_dangerous_protocol: true, + ..Options::default() + }}; + {} }} ", -- cgit