aboutsummaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-18 16:31:14 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-18 16:31:14 +0200
commit5403261e8213f68633a09fc3e9bc2e6e2cd777b2 (patch)
treebb3a6419ef42f7611c2cb24fe7024228f579331b /build.rs
parent03544cafaa82ba4bd7e0bc3372fc59549a8dc0cc (diff)
downloadmarkdown-rs-5403261e8213f68633a09fc3e9bc2e6e2cd777b2.tar.gz
markdown-rs-5403261e8213f68633a09fc3e9bc2e6e2cd777b2.tar.bz2
markdown-rs-5403261e8213f68633a09fc3e9bc2e6e2cd777b2.zip
Add support for turning off constructs
Diffstat (limited to '')
-rw-r--r--build.rs14
1 files changed, 7 insertions, 7 deletions
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()
+ }};
+
{}
}}
",