You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create additional references for duplicate footnotes (#534)
Track when we find duplicate footnote references and create unique ids for them. Then add an additional tree-processor after inline to go back and update the footnotes with additional back references that link to the duplicate footnote references. Fixes#468.
Copy file name to clipboardExpand all lines: tests/extensions/extra/footnote.html
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,8 @@
1
1
<p>This is the body with a footnote<supid="fnref:1"><aclass="footnote-ref" href="#fn:1" rel="footnote">1</a></sup> or two<supid="fnref:2"><aclass="footnote-ref" href="#fn:2" rel="footnote">2</a></sup> or more<supid="fnref:3"><aclass="footnote-ref" href="#fn:3" rel="footnote">3</a></sup><supid="fnref:4"><aclass="footnote-ref" href="#fn:4" rel="footnote">4</a></sup><supid="fnref:5"><aclass="footnote-ref" href="#fn:5" rel="footnote">5</a></sup>.</p>
<p>Single after duplicates<supid="fnref:c"><aclass="footnote-ref" href="#fn:c" rel="footnote">8</a></sup>.</p>
3
6
<divclass="footnote">
4
7
<hr/>
5
8
<ol>
@@ -29,5 +32,14 @@
29
32
Second line of first paragraph is not intended.
30
33
Nor is third... <aclass="footnote-backref" href="#fnref:5" rev="footnote" title="Jump back to footnote 5 in the text">↩</a></p>
31
34
</li>
35
+
<liid="fn:a">
36
+
<p>1 <aclass="footnote-backref" href="#fnref:a" rev="footnote" title="Jump back to footnote 6 in the text">↩</a><aclass="footnote-backref" href="#fnref2:a" rev="footnote" title="Jump back to footnote 6 in the text">↩</a><aclass="footnote-backref" href="#fnref3:a" rev="footnote" title="Jump back to footnote 6 in the text">↩</a></p>
37
+
</li>
38
+
<liid="fn:b">
39
+
<p>2 <aclass="footnote-backref" href="#fnref:b" rev="footnote" title="Jump back to footnote 7 in the text">↩</a><aclass="footnote-backref" href="#fnref2:b" rev="footnote" title="Jump back to footnote 7 in the text">↩</a><aclass="footnote-backref" href="#fnref3:b" rev="footnote" title="Jump back to footnote 7 in the text">↩</a></p>
40
+
</li>
41
+
<liid="fn:c">
42
+
<p>3 <aclass="footnote-backref" href="#fnref:c" rev="footnote" title="Jump back to footnote 8 in the text">↩</a></p>
0 commit comments