aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-13 18:21:51 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-13 18:24:54 +0200
commit5a94b95aeefd592c304f0f0515f7fc6da0b5b386 (patch)
tree8acb1a8b391047f6ac64f93fa4cece676e6169cc /tests
parent15f5ef7e8ceefbca75215141fc33136ac25f86c3 (diff)
downloadmarkdown-rs-5a94b95aeefd592c304f0f0515f7fc6da0b5b386.tar.gz
markdown-rs-5a94b95aeefd592c304f0f0515f7fc6da0b5b386.tar.bz2
markdown-rs-5a94b95aeefd592c304f0f0515f7fc6da0b5b386.zip
Add test for non-empty blank lines in footnotes
Diffstat (limited to '')
-rw-r--r--tests/gfm_footnote.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/gfm_footnote.rs b/tests/gfm_footnote.rs
index 3464193..f5ae0cb 100644
--- a/tests/gfm_footnote.rs
+++ b/tests/gfm_footnote.rs
@@ -372,6 +372,23 @@ b <a href=\"#user-content-fnref-1\" data-footnote-backref=\"\" aria-label=\"Back
assert_eq!(
to_html_with_options(
+ "[^a]\n\n[^a]: b\n \n c",
+ &gfm
+ )?,
+ "<p><sup><a href=\"#user-content-fn-a\" id=\"user-content-fnref-a\" data-footnote-ref=\"\" aria-describedby=\"footnote-label\">1</a></sup></p>
+<section data-footnotes=\"\" class=\"footnotes\"><h2 id=\"footnote-label\" class=\"sr-only\">Footnotes</h2>
+<ol>
+<li id=\"user-content-fn-a\">
+<p>b</p>
+<p>c <a href=\"#user-content-fnref-a\" data-footnote-backref=\"\" aria-label=\"Back to content\" class=\"data-footnote-backref\">↩</a></p>
+</li>
+</ol>
+</section>\n",
+ "should support blank lines in footnote definitions"
+ );
+
+ assert_eq!(
+ to_html_with_options(
r###"a![i](#)
a\![i](#)
a![i][]