From e139a804a109f1e785238f15d361ada980cca778 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 26 Oct 2022 13:14:15 +0200 Subject: Fix GFM autolink literals after tabs Closes GH-18. Co-authored-by: Christian Murphy --- tests/fuzz.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests') diff --git a/tests/fuzz.rs b/tests/fuzz.rs index 1e80701..54b4f40 100644 --- a/tests/fuzz.rs +++ b/tests/fuzz.rs @@ -74,5 +74,29 @@ fn fuzz() -> Result<(), String> { "7: lazy container lines almost starting fenced code (GH-19)" ); + assert_eq!( + to_html_with_options("a\tb@c.d", &Options::gfm()), + Ok("

a\tb@c.d

".into()), + "8-a: autolink literals after tabs (GH-18)" + ); + + assert_eq!( + to_html_with_options("aa\tb@c.d", &Options::gfm()), + Ok("

aa\tb@c.d

".into()), + "8-b: autolink literals after tabs (GH-18)" + ); + + assert_eq!( + to_html_with_options("aaa\tb@c.d", &Options::gfm()), + Ok("

aaa\tb@c.d

".into()), + "8-c: autolink literals after tabs (GH-18)" + ); + + assert_eq!( + to_html_with_options("aaaa\tb@c.d", &Options::gfm()), + Ok("

aaaa\tb@c.d

".into()), + "8-d: autolink literals after tabs (GH-18)" + ); + Ok(()) } -- cgit