From 66c6c21f7349ce6036673443afc2c1aa640682db Mon Sep 17 00:00:00 2001 From: Mick van Gelderen Date: Sat, 22 Apr 2023 10:06:05 +0200 Subject: Fix crash in MDX whitespace Related-to: GH-26. Closes GH-60. --- tests/fuzz.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/fuzz.rs') diff --git a/tests/fuzz.rs b/tests/fuzz.rs index 297e6a9..4778cbb 100644 --- a/tests/fuzz.rs +++ b/tests/fuzz.rs @@ -117,5 +117,17 @@ fn fuzz() -> Result<(), String> { "11: gfm task list items followed by eols (GH-24)" ); + assert_eq!( + markdown::to_html_with_options( + "<", + &markdown::Options { + parse: markdown::ParseOptions::mdx(), + ..Default::default() + } + ), + Ok("

<

".to_string()), + "12: mdx: handle invalid mdx without panic (GH-26)" + ); + Ok(()) } -- cgit