diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-10-25 12:52:42 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-10-25 12:52:42 +0200 |
commit | ad1b3e62aba27afa19577b18d71b1c0ac4509847 (patch) | |
tree | 063a6d231f66f4097de6af80f3333133dc9c96e0 /tests/fuzz.rs | |
parent | 2cd3e65fd85b137f4951c5ccfdc259c06d49c80e (diff) | |
download | markdown-rs-ad1b3e62aba27afa19577b18d71b1c0ac4509847.tar.gz markdown-rs-ad1b3e62aba27afa19577b18d71b1c0ac4509847.tar.bz2 markdown-rs-ad1b3e62aba27afa19577b18d71b1c0ac4509847.zip |
Fix trailing whitespace around broken data
Closes GH-13.
Closes GH-14.
Diffstat (limited to 'tests/fuzz.rs')
-rw-r--r-- | tests/fuzz.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/fuzz.rs b/tests/fuzz.rs index 8d64ff2..a4a6765 100644 --- a/tests/fuzz.rs +++ b/tests/fuzz.rs @@ -30,5 +30,23 @@ fn fuzz() -> Result<(), String> { "3-b: containers should not pierce into indented code" ); + assert_eq!( + to_html("a * "), + "<p>a *</p>", + "4-a: trailing whitespace and broken data" + ); + + assert_eq!( + to_html("_ "), + "<p>_</p>", + "4-b: trailing whitespace and broken data" + ); + + assert_eq!( + to_html_with_options("a ~ ", &Options::gfm())?, + "<p>a ~</p>", + "4-c: trailing whitespace and broken data" + ); + Ok(()) } |