From 1d92666865b35341e076efbefddf6e73b5e1542e Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 7 Sep 2022 15:53:06 +0200 Subject: Add support for recoverable syntax errors --- build.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'build.rs') diff --git a/build.rs b/build.rs index b485bb5..e32493c 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(\n r###\"{}\"###,\n &danger\n ),\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); @@ -73,7 +73,7 @@ use pretty_assertions::assert_eq; #[rustfmt::skip] #[test] -fn commonmark() {{ +fn commonmark() -> Result<(), String> {{ let danger = Options {{ allow_dangerous_html: true, allow_dangerous_protocol: true, @@ -81,6 +81,8 @@ fn commonmark() {{ }}; {} + + Ok(()) }} ", cases.join("\n\n") -- cgit