aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fuzz.rs
diff options
context:
space:
mode:
authorLibravatar Mick van Gelderen <mickvangelderen@gmail.com>2023-04-22 10:06:05 +0200
committerLibravatar GitHub <noreply@github.com>2023-04-22 10:06:05 +0200
commit66c6c21f7349ce6036673443afc2c1aa640682db (patch)
treee3556391fd0e0d092f3bb479a56711cd30116afd /tests/fuzz.rs
parentb3a921c761309ae00a51fe348d8a43adbc54b518 (diff)
downloadmarkdown-rs-66c6c21f7349ce6036673443afc2c1aa640682db.tar.gz
markdown-rs-66c6c21f7349ce6036673443afc2c1aa640682db.tar.bz2
markdown-rs-66c6c21f7349ce6036673443afc2c1aa640682db.zip
Fix crash in MDX whitespace
Related-to: GH-26. Closes GH-60.
Diffstat (limited to '')
-rw-r--r--tests/fuzz.rs12
1 files changed, 12 insertions, 0 deletions
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("<p>&lt;</p>".to_string()),
+ "12: mdx: handle invalid mdx without panic (GH-26)"
+ );
+
Ok(())
}