Skip to content

Commit 09d22e9

Browse files
krishanjmistryehuss
authored andcommitted
Add a test for duplicate footnote definitions
1 parent 1696f56 commit 09d22e9

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ <h1 id="footnote-tests"><a class="header" href="#footnote-tests">Footnote tests<
55
<p>Footnote with multiple paragraphs<sup class="footnote-reference" id="fr-multiple-1"><a href="#footnote-multiple">4</a></sup></p>
66
<p>Footnote name with wacky characters<sup class="footnote-reference" id="fr-&quot;wacky&quot;-1"><a href="#footnote-&quot;wacky&quot;">5</a></sup></p>
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>
8+
<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>
9+
<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>
810
<hr>
911
<ol class="footnote-definition"><li id="footnote-1">
1012
<p>This is a footnote. <a href="#fr-1-1"></a> <a href="#fr-1-2">↩2</a></p>
@@ -35,4 +37,13 @@ <h1 id="footnote-tests"><a class="header" href="#footnote-tests">Footnote tests<
3537
<li id="footnote-define-before-use">
3638
<p>This is defined before it is referred to. <a href="#fr-define-before-use-1"></a></p>
3739
</li>
40+
<li id="footnote-multiple-definitions">
41+
<p>This is the first definition of the footnote with tag multiple-definitions <a href="#fr-multiple-definitions-1"></a> <a href="#fr-multiple-definitions-2">↩2</a></p>
42+
</li>
43+
<li id="footnote-multiple-definitions">
44+
<p>This is the second definition of the footnote with tag multiple-definitions <a href="#fr-multiple-definitions-1"></a> <a href="#fr-multiple-definitions-2">↩2</a></p>
45+
</li>
46+
<li id="footnote-in-between">
47+
<p>Footnote between duplicates. <a href="#fr-in-between-1"></a></p>
48+
</li>
3849
</ol>

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,13 @@ Footnote name with wacky characters[^"wacky"]
3535
[^"wacky"]: Testing footnote id with special characters.
3636

3737
Testing when referring to something earlier.[^define-before-use]
38+
39+
Footnote that is defined multiple times.[^multiple-definitions]
40+
41+
[^multiple-definitions]: This is the first definition of the footnote with tag multiple-definitions
42+
43+
And another[^in-between] that references the duplicate again.[^multiple-definitions]
44+
45+
[^in-between]: Footnote between duplicates.
46+
47+
[^multiple-definitions]: This is the second definition of the footnote with tag multiple-definitions

0 commit comments

Comments
 (0)