From 48823f080218d5a13dbde2ed152b8144de5afef8 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Sat, 29 Oct 2022 12:28:58 +0200 Subject: Fix attention starting and ending in different links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Example: ```markdown [*]() [*]() ``` There was already code for: ```markdown [*]() x*. *x [*](). ``` But that wasn’t correct for attention at the same depth but in different places. Closes GH-21. Co-authored-by: Christian Murphy --- tests/fuzz.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/fuzz.rs') diff --git a/tests/fuzz.rs b/tests/fuzz.rs index 522e32f..e6816e6 100644 --- a/tests/fuzz.rs +++ b/tests/fuzz.rs @@ -104,5 +104,11 @@ fn fuzz() -> Result<(), String> { "9: autolink literals that end in table cell delimiter (GH-20)" ); + assert_eq!( + to_html_with_options("[*]() [*]()", &Options::gfm()), + Ok("

* *

".into()), + "10: attention in different links (GH-21)" + ); + Ok(()) } -- cgit