aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-29 12:28:58 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-29 12:28:58 +0200
commit48823f080218d5a13dbde2ed152b8144de5afef8 (patch)
tree0d26426681fee7f6dccf815944a0c02e2486fe0f /tests
parent7bf7e86db9db89da11f80d2199bcd5ca7988efba (diff)
downloadmarkdown-rs-48823f080218d5a13dbde2ed152b8144de5afef8.tar.gz
markdown-rs-48823f080218d5a13dbde2ed152b8144de5afef8.tar.bz2
markdown-rs-48823f080218d5a13dbde2ed152b8144de5afef8.zip
Fix attention starting and ending in different links
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 <christian.murphy.42@gmail.com>
Diffstat (limited to '')
-rw-r--r--tests/fuzz.rs6
1 files changed, 6 insertions, 0 deletions
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("<p><a href=\"\">*</a> <a href=\"\">*</a></p>".into()),
+ "10: attention in different links (GH-21)"
+ );
+
Ok(())
}