Add test case for footnote with non-number label
This commit is contained in:
parent
a7563ce461
commit
f1a747ad72
3 changed files with 23 additions and 11 deletions
26
org/testdata/footnotes.html
vendored
26
org/testdata/footnotes.html
vendored
|
@ -12,7 +12,7 @@ Using some footnotes
|
|||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
normal footnote reference <sup class="footnote-reference"><a id="footnote-reference-0" href="#footnote-0">0</a></sup> <sup class="footnote-reference"><a id="footnote-reference-1" href="#footnote-1">1</a></sup>
|
||||
normal footnote reference <sup class="footnote-reference"><a id="footnote-reference-0" href="#footnote-0">0</a></sup> <sup class="footnote-reference"><a id="footnote-reference-1" href="#footnote-1">1</a></sup> <sup class="footnote-reference"><a id="footnote-reference-2" href="#footnote-2">2</a></sup> (footnote names can be anything in the format <code class="verbatim">[\w-]</code>)
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -22,18 +22,18 @@ further references to the same footnote should not <sup class="footnote-referenc
|
|||
</li>
|
||||
<li>
|
||||
<p>
|
||||
inline footnotes are also supported via <sup class="footnote-reference"><a id="footnote-reference-2" href="#footnote-2">2</a></sup>.
|
||||
inline footnotes are also supported via <sup class="footnote-reference"><a id="footnote-reference-3" href="#footnote-3">3</a></sup>.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
anonymous inline footnotes are also supported via <sup class="footnote-reference"><a id="footnote-reference-3" href="#footnote-3">3</a></sup>.
|
||||
anonymous inline footnotes are also supported via <sup class="footnote-reference"><a id="footnote-reference-4" href="#footnote-4">4</a></sup>.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
Footnote definitions are not printed where they appear.
|
||||
Rather, they are gathered and exported at the end of the document in the footnote section. <sup class="footnote-reference"><a id="footnote-reference-4" href="#footnote-4">4</a></sup>
|
||||
Rather, they are gathered and exported at the end of the document in the footnote section. <sup class="footnote-reference"><a id="footnote-reference-5" href="#footnote-5">5</a></sup>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -41,10 +41,10 @@ Rather, they are gathered and exported at the end of the document in the footnot
|
|||
Footnotes
|
||||
</h1>
|
||||
<p>
|
||||
Please note that the footnotes section is not automatically excluded from the export like in emacs. <sup class="footnote-reference"><a id="footnote-reference-5" href="#footnote-5">5</a></sup>
|
||||
Please note that the footnotes section is not automatically excluded from the export like in emacs. <sup class="footnote-reference"><a id="footnote-reference-6" href="#footnote-6">6</a></sup>
|
||||
</p>
|
||||
<p>
|
||||
this is not part of <sup class="footnote-reference"><a id="footnote-reference-5" href="#footnote-5">5</a></sup> anymore as there are 2 blank lines in between!
|
||||
this is not part of <sup class="footnote-reference"><a id="footnote-reference-6" href="#footnote-6">6</a></sup> anymore as there are 2 blank lines in between!
|
||||
</p>
|
||||
<div class="footnotes">
|
||||
<hr class="footnotes-separatator">
|
||||
|
@ -115,7 +115,7 @@ This shouldn't happen when the definition line and the line after that are e
|
|||
<sup id="footnote-2"><a href="#footnote-reference-2">2</a></sup>
|
||||
<div class="footnote-body">
|
||||
<p>
|
||||
the inline footnote definition
|
||||
yolo
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -123,7 +123,7 @@ the inline footnote definition
|
|||
<sup id="footnote-3"><a href="#footnote-reference-3">3</a></sup>
|
||||
<div class="footnote-body">
|
||||
<p>
|
||||
the anonymous inline footnote definition
|
||||
the inline footnote definition
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -131,13 +131,21 @@ the anonymous inline footnote definition
|
|||
<sup id="footnote-4"><a href="#footnote-reference-4">4</a></sup>
|
||||
<div class="footnote-body">
|
||||
<p>
|
||||
the anonymous inline footnote definition
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footnote-definition">
|
||||
<sup id="footnote-5"><a href="#footnote-reference-5">5</a></sup>
|
||||
<div class="footnote-body">
|
||||
<p>
|
||||
so this definition will not be at the end of this section in the exported document.
|
||||
Rather, it will be somewhere down below in the footnotes section.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footnote-definition">
|
||||
<sup id="footnote-5"><a href="#footnote-reference-5">5</a></sup>
|
||||
<sup id="footnote-6"><a href="#footnote-reference-6">6</a></sup>
|
||||
<div class="footnote-body">
|
||||
<p>
|
||||
There's multiple reasons for that. Among others, doing so requires i18n (to recognize the section) and silently
|
||||
|
|
4
org/testdata/footnotes.org
vendored
4
org/testdata/footnotes.org
vendored
|
@ -1,5 +1,5 @@
|
|||
* Using some footnotes
|
||||
- normal footnote reference [fn:1] [fn:6]
|
||||
- normal footnote reference [fn:1] [fn:6] [fn:foo-bar] (footnote names can be anything in the format =[\w-]=)
|
||||
- further references to the same footnote should not [fn:1] render duplicates in the footnote list
|
||||
- inline footnotes are also supported via [fn:2:the inline footnote definition].
|
||||
- anonymous inline footnotes are also supported via [fn::the anonymous inline footnote definition].
|
||||
|
@ -14,6 +14,8 @@ of the same name later on in the document. That will log a warning but carry on
|
|||
* Footnotes
|
||||
Please note that the footnotes section is not automatically excluded from the export like in emacs. [fn:7]
|
||||
|
||||
[fn:foo-bar] yolo
|
||||
|
||||
[fn:1] https://www.example.com
|
||||
- footnotes can contain *markup*
|
||||
- and other elements
|
||||
|
|
4
org/testdata/footnotes.pretty_org
vendored
4
org/testdata/footnotes.pretty_org
vendored
|
@ -1,5 +1,5 @@
|
|||
* Using some footnotes
|
||||
- normal footnote reference [fn:1] [fn:6]
|
||||
- normal footnote reference [fn:1] [fn:6] [fn:foo-bar] (footnote names can be anything in the format =[\w-]=)
|
||||
- further references to the same footnote should not [fn:1] render duplicates in the footnote list
|
||||
- inline footnotes are also supported via [fn:2:the inline footnote definition].
|
||||
- anonymous inline footnotes are also supported via [fn::the anonymous inline footnote definition].
|
||||
|
@ -14,6 +14,8 @@ of the same name later on in the document. That will log a warning but carry on
|
|||
* Footnotes
|
||||
Please note that the footnotes section is not automatically excluded from the export like in emacs. [fn:7]
|
||||
|
||||
[fn:foo-bar] yolo
|
||||
|
||||
[fn:1] https://www.example.com
|
||||
- footnotes can contain *markup*
|
||||
- and other elements
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue