aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gfm_footnote.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gfm_footnote.rs')
-rw-r--r--tests/gfm_footnote.rs103
1 files changed, 53 insertions, 50 deletions
diff --git a/tests/gfm_footnote.rs b/tests/gfm_footnote.rs
index 8c6cc54..d371455 100644
--- a/tests/gfm_footnote.rs
+++ b/tests/gfm_footnote.rs
@@ -3,7 +3,7 @@ use micromark::{micromark, micromark_with_options, Constructs, Options};
use pretty_assertions::assert_eq;
#[test]
-fn gfm_footnote() {
+fn gfm_footnote() -> Result<(), String> {
let gfm = Options {
constructs: Constructs::gfm(),
..Options::default()
@@ -16,7 +16,7 @@ fn gfm_footnote() {
);
assert_eq!(
- micromark_with_options("A call.[^a]\n\n[^a]: whatevs", &gfm),
+ micromark_with_options("A call.[^a]\n\n[^a]: whatevs", &gfm)?,
"<p>A call.<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>
@@ -28,6 +28,7 @@ fn gfm_footnote() {
",
"should support footnotes"
);
+
assert_eq!(
micromark_with_options(
"Noot.[^a]\n\n[^a]: dingen",
@@ -37,7 +38,7 @@ fn gfm_footnote() {
gfm_footnote_back_label: Some("Terug naar de inhoud".to_string()),
..Options::default()
}
- ),
+ )?,
"<p>Noot.<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\">Voetnoten</h2>
<ol>
@@ -58,7 +59,7 @@ fn gfm_footnote() {
gfm_footnote_label_tag_name: Some("h1".to_string()),
..Options::default()
}
- ),
+ )?,
"<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\"><h1 id=\"footnote-label\" class=\"sr-only\">Footnotes</h1>
<ol>
@@ -79,7 +80,7 @@ fn gfm_footnote() {
gfm_footnote_label_attributes: Some("class=\"footnote-heading\"".to_string()),
..Options::default()
}
- ),
+ )?,
"<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=\"footnote-heading\">Footnotes</h2>
<ol>
@@ -100,7 +101,7 @@ fn gfm_footnote() {
gfm_footnote_clobber_prefix: Some("".to_string()),
..Options::default()
}
- ),
+ )?,
"<p><sup><a href=\"#fn-a\" id=\"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>
@@ -114,19 +115,19 @@ fn gfm_footnote() {
);
assert_eq!(
- micromark_with_options("A paragraph.\n\n[^a]: whatevs", &gfm),
+ micromark_with_options("A paragraph.\n\n[^a]: whatevs", &gfm)?,
"<p>A paragraph.</p>\n",
"should ignore definitions w/o calls"
);
assert_eq!(
- micromark_with_options("a[^b]", &gfm),
+ micromark_with_options("a[^b]", &gfm)?,
"<p>a[^b]</p>",
"should ignore calls w/o definitions"
);
assert_eq!(
- micromark_with_options("a[^b]\n\n[^b]: c\n[^b]: d", &gfm),
+ micromark_with_options("a[^b]\n\n[^b]: c\n[^b]: d", &gfm)?,
"<p>a<sup><a href=\"#user-content-fn-b\" id=\"user-content-fnref-b\" 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>
@@ -140,7 +141,7 @@ fn gfm_footnote() {
);
assert_eq!(
- micromark_with_options("a[^b], c[^b]\n\n[^b]: d", &gfm),
+ micromark_with_options("a[^b], c[^b]\n\n[^b]: d", &gfm)?,
"<p>a<sup><a href=\"#user-content-fn-b\" id=\"user-content-fnref-b\" data-footnote-ref=\"\" aria-describedby=\"footnote-label\">1</a></sup>, c<sup><a href=\"#user-content-fn-b\" id=\"user-content-fnref-b-2\" 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>
@@ -154,32 +155,32 @@ fn gfm_footnote() {
);
assert_eq!(
- micromark_with_options("![^a](b)", &gfm),
+ micromark_with_options("![^a](b)", &gfm)?,
"<p>!<a href=\"b\">^a</a></p>",
"should not support images starting w/ `^` (but see it as a link?!, 1)"
);
assert_eq!(
- micromark_with_options("![^a][b]\n\n[b]: c", &gfm),
+ micromark_with_options("![^a][b]\n\n[b]: c", &gfm)?,
"<p>!<a href=\"c\">^a</a></p>\n",
"should not support images starting w/ `^` (but see it as a link?!, 2)"
);
assert_eq!(
- micromark_with_options("[^]()", &gfm),
+ micromark_with_options("[^]()", &gfm)?,
"<p><a href=\"\">^</a></p>",
"should support an empty link with caret"
);
assert_eq!(
- micromark_with_options("![^]()", &gfm),
+ micromark_with_options("![^]()", &gfm)?,
"<p>!<a href=\"\">^</a></p>",
"should support an empty image with caret (as link)"
);
// <https://github.com/github/cmark-gfm/issues/239>
assert_eq!(
- micromark_with_options("Call.[^a\\+b].\n\n[^a\\+b]: y", &gfm),
+ micromark_with_options("Call.[^a\\+b].\n\n[^a\\+b]: y", &gfm)?,
"<p>Call.<sup><a href=\"#user-content-fn-a%5C+b\" id=\"user-content-fnref-a%5C+b\" 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>
@@ -193,7 +194,7 @@ fn gfm_footnote() {
);
assert_eq!(
- micromark_with_options("Call.[^a&copy;b].\n\n[^a&copy;b]: y", &gfm),
+ micromark_with_options("Call.[^a&copy;b].\n\n[^a&copy;b]: y", &gfm)?,
"<p>Call.<sup><a href=\"#user-content-fn-a&amp;copy;b\" id=\"user-content-fnref-a&amp;copy;b\" 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>
@@ -209,7 +210,7 @@ fn gfm_footnote() {
// <https://github.com/github/cmark-gfm/issues/239>
// <https://github.com/github/cmark-gfm/issues/240>
assert_eq!(
- micromark_with_options("Call.[^a\\]b].\n\n[^a\\]b]: y", &gfm),
+ micromark_with_options("Call.[^a\\]b].\n\n[^a\\]b]: y", &gfm)?,
"<p>Call.<sup><a href=\"#user-content-fn-a%5C%5Db\" id=\"user-content-fnref-a%5C%5Db\" 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>
@@ -223,7 +224,7 @@ fn gfm_footnote() {
);
assert_eq!(
- micromark_with_options("Call.[^a&#91;b].\n\n[^a&#91;b]: y", &gfm),
+ micromark_with_options("Call.[^a&#91;b].\n\n[^a&#91;b]: y", &gfm)?,
"<p>Call.<sup><a href=\"#user-content-fn-a&amp;#91;b\" id=\"user-content-fnref-a&amp;#91;b\" 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>
@@ -237,19 +238,19 @@ fn gfm_footnote() {
);
assert_eq!(
- micromark_with_options("Call.[^a\\+b].\n\n[^a+b]: y", &gfm),
+ micromark_with_options("Call.[^a\\+b].\n\n[^a+b]: y", &gfm)?,
"<p>Call.[^a+b].</p>\n",
"should match calls to definitions on the source of the label, not on resolved escapes"
);
assert_eq!(
- micromark_with_options("Call.[^a&#91;b].\n\n[^a\\[b]: y", &gfm),
+ micromark_with_options("Call.[^a&#91;b].\n\n[^a\\[b]: y", &gfm)?,
"<p>Call.[^a[b].</p>\n",
"should match calls to definitions on the source of the label, not on resolved references"
);
assert_eq!(
- micromark_with_options("[^1].\n\n[^1]: a\nb", &gfm),
+ micromark_with_options("[^1].\n\n[^1]: a\nb", &gfm)?,
"<p><sup><a href=\"#user-content-fn-1\" id=\"user-content-fnref-1\" 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>
@@ -264,7 +265,7 @@ b <a href=\"#user-content-fnref-1\" data-footnote-backref=\"\" class=\"data-foot
);
assert_eq!(
- micromark_with_options("[^1].\n\n> [^1]: a\nb", &gfm),
+ micromark_with_options("[^1].\n\n> [^1]: a\nb", &gfm)?,
"<p><sup><a href=\"#user-content-fn-1\" id=\"user-content-fnref-1\" data-footnote-ref=\"\" aria-describedby=\"footnote-label\">1</a></sup>.</p>
<blockquote>
</blockquote>
@@ -281,7 +282,7 @@ b <a href=\"#user-content-fnref-1\" data-footnote-backref=\"\" class=\"data-foot
);
assert_eq!(
- micromark_with_options("[^1].\n\n> [^1]: a\n> b", &gfm),
+ micromark_with_options("[^1].\n\n> [^1]: a\n> b", &gfm)?,
"<p><sup><a href=\"#user-content-fn-1\" id=\"user-content-fnref-1\" data-footnote-ref=\"\" aria-describedby=\"footnote-label\">1</a></sup>.</p>
<blockquote>
</blockquote>
@@ -298,7 +299,7 @@ b <a href=\"#user-content-fnref-1\" data-footnote-backref=\"\" class=\"data-foot
);
assert_eq!(
- micromark_with_options("[^1].\n\n[^1]: a\n\n > b", &gfm),
+ micromark_with_options("[^1].\n\n[^1]: a\n\n > b", &gfm)?,
"<p><sup><a href=\"#user-content-fn-1\" id=\"user-content-fnref-1\" 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>
@@ -319,7 +320,7 @@ b <a href=\"#user-content-fnref-1\" data-footnote-backref=\"\" class=\"data-foot
let max = "x".repeat(999);
assert_eq!(
- micromark_with_options(format!("Call.[^{}].\n\n[^{}]: y", max, max).as_str(), &gfm),
+ micromark_with_options(format!("Call.[^{}].\n\n[^{}]: y", max, max).as_str(), &gfm)?,
format!("<p>Call.<sup><a href=\"#user-content-fn-{}\" id=\"user-content-fnref-{}\" 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>
@@ -336,7 +337,7 @@ b <a href=\"#user-content-fnref-1\" data-footnote-backref=\"\" class=\"data-foot
micromark_with_options(
format!("Call.[^a{}].\n\n[^a{}]: y", max, max).as_str(),
&gfm
- ),
+ )?,
format!("<p>Call.[^a{}].</p>\n<p>[^a{}]: y</p>", max, max),
"should not support 1000 characters in a call / definition"
);
@@ -354,7 +355,7 @@ a![^1]
[i]: c"###,
&gfm
- ),
+ )?,
r###"<p>a<img src="#" alt="i" />
a!<a href="#">i</a>
a<img src="c" alt="i" />
@@ -373,7 +374,7 @@ a!<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref=
);
assert_eq!(
- micromark_with_options("a![^1]", &gfm),
+ micromark_with_options("a![^1]", &gfm)?,
"<p>a![^1]</p>",
"should match bang/caret interplay (undefined) like GitHub"
);
@@ -385,7 +386,7 @@ a!<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref=
[^1]: b
"###,
&gfm
- ),
+ )?,
r###"<p>a!<sup><a href="#user-content-fn-1" id="user-content-fnref-1" 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>
@@ -424,7 +425,7 @@ even another caret.
[^^]: caret
"###,
&gfm
- ),
+ )?,
r###"<p>Calls may not be empty: <a href="empty">^</a>.</p>
<p>Calls cannot contain whitespace only: <a href="empty">^ </a>.</p>
<p>Calls cannot contain whitespace at all: <a href="empty">^ </a>, <a href="empty">^ </a>, <a href="empty">^
@@ -482,7 +483,7 @@ even another caret.</p>
[^![image](#)]: a
"###,
&gfm
- ),
+ )?,
// Note:
// * GH does not support colons.
// See: <https://github.com/github/cmark-gfm/issues/250>
@@ -541,7 +542,7 @@ even another caret.</p>
[^4]: Directly after a list item.
"###,
&gfm
- ),
+ )?,
r###"<p>Call<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup><sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup><sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup></p>
<blockquote>
<p>More.</p>
@@ -598,7 +599,7 @@ even another caret.</p>
- list
"###,
&gfm
- ),
+ )?,
r###"<p><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup><sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup><sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup></p>
<h1>Heading</h1>
<blockquote>
@@ -655,7 +656,7 @@ Lazy?
Lazy!
"###,
&gfm
- ),
+ )?,
r###"<p>Call<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup><sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup><sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup><sup><a href="#user-content-fn-5" id="user-content-fnref-5" data-footnote-ref="" aria-describedby="footnote-label">5</a></sup>.</p>
<p>Lazy?</p>
<p>Lazy!</p>
@@ -711,7 +712,7 @@ Lazy!
[^10]:- - - kilo
"###,
&gfm
- ),
+ )?,
r###"<p>Note!<sup><a href="#user-content-fn-0" id="user-content-fnref-0" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup><sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup><sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup><sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">5</a></sup><sup><a href="#user-content-fn-5" id="user-content-fnref-5" data-footnote-ref="" aria-describedby="footnote-label">6</a></sup><sup><a href="#user-content-fn-6" id="user-content-fnref-6" data-footnote-ref="" aria-describedby="footnote-label">7</a></sup><sup><a href="#user-content-fn-7" id="user-content-fnref-7" data-footnote-ref="" aria-describedby="footnote-label">8</a></sup><sup><a href="#user-content-fn-8" id="user-content-fnref-8" data-footnote-ref="" aria-describedby="footnote-label">9</a></sup><sup><a href="#user-content-fn-9" id="user-content-fnref-9" data-footnote-ref="" aria-describedby="footnote-label">10</a></sup><sup><a href="#user-content-fn-10" id="user-content-fnref-10" data-footnote-ref="" aria-describedby="footnote-label">11</a></sup></p>
<section data-footnotes="" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol>
@@ -784,7 +785,7 @@ indented delta <a href="#user-content-fnref-2" data-footnote-backref="" class="d
[^1]: Recursion[^1][^1]
"###,
&gfm
- ),
+ )?,
r###"<p>Call<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-1" id="user-content-fnref-1-2" 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>
@@ -806,7 +807,7 @@ indented delta <a href="#user-content-fnref-2" data-footnote-backref="" class="d
[^1]: b
"###,
&gfm
- ),
+ )?,
r###"<p>Call<sup><a href="#user-content-fn-1" id="user-content-fnref-1" 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>
@@ -848,7 +849,7 @@ indented delta <a href="#user-content-fnref-2" data-footnote-backref="" class="d
[^5]: e
"###,
&gfm
- ),
+ )?,
r###"<p><em>emphasis<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup></em></p>
<p><strong>strong<sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup></strong></p>
<p><code>code[^3]</code></p>
@@ -885,7 +886,7 @@ indented delta <a href="#user-content-fnref-2" data-footnote-backref="" class="d
[^3]: c
"###,
&gfm
- ),
+ )?,
r###"<p>What are these!<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup>, !<sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup>[], and ![this]<sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup>.</p>
<section data-footnotes="" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol>
@@ -927,7 +928,7 @@ indented delta <a href="#user-content-fnref-2" data-footnote-backref="" class="d
* list
"###,
&gfm
- ),
+ )?,
r###"<p><sup><a href="#user-content-fn-0" id="user-content-fnref-0" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup><sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup><sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup><sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">5</a></sup><sup><a href="#user-content-fn-5" id="user-content-fnref-5" data-footnote-ref="" aria-describedby="footnote-label">6</a></sup></p>
<h1>Heading</h1>
<blockquote>
@@ -980,7 +981,7 @@ indented delta <a href="#user-content-fnref-2" data-footnote-backref="" class="d
[^3]: c
"###,
&gfm
- ),
+ )?,
r###"<p>What are these<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup>, <sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup>[], and [this]<sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup>.</p>
<section data-footnotes="" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol>
@@ -1030,7 +1031,7 @@ indented delta <a href="#user-content-fnref-2" data-footnote-backref="" class="d
- list
"###,
&gfm
- ),
+ )?,
r###"<p><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup><sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup><sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup></p>
<h1>Heading</h1>
<blockquote>
@@ -1092,7 +1093,7 @@ indented delta <a href="#user-content-fnref-2" data-footnote-backref="" class="d
- list
"###,
&gfm
- ),
+ )?,
r###"<p><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup><sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup><sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup></p>
<section data-footnotes="" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol>
@@ -1141,7 +1142,7 @@ more code
[^3]: [^4]: Paragraph
"###,
&gfm
- ),
+ )?,
r###"<p>Note!<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup><sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup><sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup></p>
<ul>
<li></li>
@@ -1191,7 +1192,7 @@ more code
- list
"###,
&gfm
- ),
+ )?,
r###"<p><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup><sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup><sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup></p>
<h1>Heading</h1>
<blockquote>
@@ -1245,7 +1246,7 @@ more code
- list
"###,
&gfm
- ),
+ )?,
r###"<p><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup><sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup><sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup></p>
<section data-footnotes="" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol>
@@ -1303,7 +1304,7 @@ This paragraph won’t be part of the note, because it
isn’t indented.
"###,
&gfm
- ),
+ )?,
r###"<p>Here is a footnote reference,<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup> and another.<sup><a href="#user-content-fn-longnote" id="user-content-fnref-longnote" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup></p>
<p>This paragraph won’t be part of the note, because it
isn’t indented.</p>
@@ -1371,7 +1372,7 @@ multi-paragraph list items. <a href="#user-content-fnref-longnote" data-footnote
3
"###,
&gfm
- ),
+ )?,
r###"<p>Call[^1][^2]<sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup><sup><a href="#user-content-fn-5" id="user-content-fnref-5" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup><sup><a href="#user-content-fn-6" id="user-content-fnref-6" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup><sup><a href="#user-content-fn-7" id="user-content-fnref-7" data-footnote-ref="" aria-describedby="footnote-label">5</a></sup><sup><a href="#user-content-fn-8" id="user-content-fnref-8" data-footnote-ref="" aria-describedby="footnote-label">6</a></sup><sup><a href="#user-content-fn-9" id="user-content-fnref-9" data-footnote-ref="" aria-describedby="footnote-label">7</a></sup><sup><a href="#user-content-fn-10" id="user-content-fnref-10" data-footnote-ref="" aria-describedby="footnote-label">8</a></sup><sup><a href="#user-content-fn-11" id="user-content-fnref-11" data-footnote-ref="" aria-describedby="footnote-label">9</a></sup><sup><a href="#user-content-fn-12" id="user-content-fnref-12" data-footnote-ref="" aria-describedby="footnote-label">10</a></sup>.</p>
<pre><code> [^1]: 5
@@ -1463,7 +1464,7 @@ multi-paragraph list items. <a href="#user-content-fnref-longnote" data-footnote
0
"###,
&gfm
- ),
+ )?,
r###"<p>Call<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup><sup><a href="#user-content-fn-3" id="user-content-fnref-3" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup><sup><a href="#user-content-fn-4" id="user-content-fnref-4" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup><sup><a href="#user-content-fn-5" id="user-content-fnref-5" data-footnote-ref="" aria-describedby="footnote-label">5</a></sup><sup><a href="#user-content-fn-6" id="user-content-fnref-6" data-footnote-ref="" aria-describedby="footnote-label">6</a></sup><sup><a href="#user-content-fn-7" id="user-content-fnref-7" data-footnote-ref="" aria-describedby="footnote-label">7</a></sup><sup><a href="#user-content-fn-8" id="user-content-fnref-8" data-footnote-ref="" aria-describedby="footnote-label">8</a></sup><sup><a href="#user-content-fn-9" id="user-content-fnref-9" data-footnote-ref="" aria-describedby="footnote-label">9</a></sup>.</p>
<p>3</p>
<p>2</p>
@@ -1522,9 +1523,11 @@ multi-paragraph list items. <a href="#user-content-fnref-longnote" data-footnote
[3]: c
"###,
&gfm
- ),
+ )?,
r###"<p>Here is a short reference,<a href="a">1</a>, a collapsed one,<a href="b">2</a>, and a full <a href="c">one</a>.</p>
"###,
"should match references and definitions like GitHub"
);
+
+ Ok(())
}