Skip to content

Commit 82a457b

Browse files
committed
Add a test for multiple footnotes in a row
These were previously broken in older versions of pulldown-cmark.
1 parent dbb51d3 commit 82a457b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/testsuite/markdown/footnotes/expected/footnotes.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ <h1 id="footnote-tests"><a class="header" href="#footnote-tests">Footnote tests<
77
<p>Testing when referring to something earlier.<sup class="footnote-reference" id="fr-define-before-use-1"><a href="#footnote-define-before-use">6</a></sup></p>
88
<p>Footnote that is defined multiple times.<sup class="footnote-reference" id="fr-multiple-definitions-1"><a href="#footnote-multiple-definitions">7</a></sup></p>
99
<p>And another<sup class="footnote-reference" id="fr-in-between-1"><a href="#footnote-in-between">8</a></sup> that references the duplicate again.<sup class="footnote-reference" id="fr-multiple-definitions-2"><a href="#footnote-multiple-definitions">7</a></sup></p>
10+
<p>Multiple footnotes in a row.<sup class="footnote-reference" id="fr-a-1"><a href="#footnote-a">9</a></sup><sup class="footnote-reference" id="fr-b-1"><a href="#footnote-b">10</a></sup><sup class="footnote-reference" id="fr-c-1"><a href="#footnote-c">11</a></sup></p>
1011
<hr>
1112
<ol class="footnote-definition"><li id="footnote-1">
1213
<p>This is a footnote. <a href="#fr-1-1"></a> <a href="#fr-1-2">↩2</a></p>
@@ -43,4 +44,13 @@ <h1 id="footnote-tests"><a class="header" href="#footnote-tests">Footnote tests<
4344
<li id="footnote-in-between">
4445
<p>Footnote between duplicates. <a href="#fr-in-between-1"></a></p>
4546
</li>
47+
<li id="footnote-a">
48+
<p>Footnote 1 <a href="#fr-a-1"></a></p>
49+
</li>
50+
<li id="footnote-b">
51+
<p>Footnote 2 <a href="#fr-b-1"></a></p>
52+
</li>
53+
<li id="footnote-c">
54+
<p>Footnote 3 <a href="#fr-c-1"></a></p>
55+
</li>
4656
</ol>

tests/testsuite/markdown/footnotes/src/footnotes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,9 @@ And another[^in-between] that references the duplicate again.[^multiple-definiti
4545
[^in-between]: Footnote between duplicates.
4646

4747
[^multiple-definitions]: This is the second definition of the footnote with tag multiple-definitions
48+
49+
Multiple footnotes in a row.[^a][^b][^c]
50+
51+
[^a]: Footnote 1
52+
[^b]: Footnote 2
53+
[^c]: Footnote 3

0 commit comments

Comments
 (0)