From ad1b3e62aba27afa19577b18d71b1c0ac4509847 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 25 Oct 2022 12:52:42 +0200 Subject: Fix trailing whitespace around broken data Closes GH-13. Closes GH-14. --- tests/fuzz.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests/fuzz.rs') 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 * "), + "

a *

", + "4-a: trailing whitespace and broken data" + ); + + assert_eq!( + to_html("_ "), + "

_

", + "4-b: trailing whitespace and broken data" + ); + + assert_eq!( + to_html_with_options("a ~ ", &Options::gfm())?, + "

a ~

", + "4-c: trailing whitespace and broken data" + ); + Ok(()) } -- cgit