For simple list items, don't wrap in <p> tags
This also removes extra newlines for simple list items, see changes to tests for details. Closes #57
This commit is contained in:
parent
429602aba7
commit
4d3a099922
9 changed files with 146 additions and 319 deletions
30
org/testdata/footnotes.html
vendored
30
org/testdata/footnotes.html
vendored
|
@ -12,25 +12,13 @@ Using some footnotes
|
|||
</h2>
|
||||
<div id="outline-text-headline-1" class="outline-text-2">
|
||||
<ul>
|
||||
<li>
|
||||
<p>normal footnote reference <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> <sup class="footnote-reference"><a id="footnote-reference-3" href="#footnote-3">3</a></sup> (footnote names can be anything in the format <code class="verbatim">[\w-]</code>)</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>further references to the same footnote should not <sup class="footnote-reference"><a id="footnote-reference-1" href="#footnote-1">1</a></sup> render duplicates in the footnote list</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>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>anonymous inline footnotes are also supported via <sup class="footnote-reference"><a id="footnote-reference-5" href="#footnote-5">5</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-6" href="#footnote-6">6</a></sup></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>footnotes that reference a non-existant definition are rendered but log a warning <sup class="footnote-reference"><a id="footnote-reference-7" href="#footnote-7">7</a></sup></p>
|
||||
</li>
|
||||
<li>normal footnote reference <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> <sup class="footnote-reference"><a id="footnote-reference-3" href="#footnote-3">3</a></sup> (footnote names can be anything in the format <code class="verbatim">[\w-]</code>)</li>
|
||||
<li>further references to the same footnote should not <sup class="footnote-reference"><a id="footnote-reference-1" href="#footnote-1">1</a></sup> render duplicates in the footnote list</li>
|
||||
<li>inline footnotes are also supported via <sup class="footnote-reference"><a id="footnote-reference-4" href="#footnote-4">4</a></sup>.</li>
|
||||
<li>anonymous inline footnotes are also supported via <sup class="footnote-reference"><a id="footnote-reference-5" href="#footnote-5">5</a></sup>.</li>
|
||||
<li>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-6" href="#footnote-6">6</a></sup></li>
|
||||
<li>footnotes that reference a non-existant definition are rendered but log a warning <sup class="footnote-reference"><a id="footnote-reference-7" href="#footnote-7">7</a></sup></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -52,9 +40,7 @@ this is not part of <sup class="footnote-reference"><a id="footnote-reference-8"
|
|||
<div class="footnote-body">
|
||||
<p><a href="https://www.example.com">https://www.example.com</a></p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>footnotes can contain <strong>markup</strong></p>
|
||||
</li>
|
||||
<li>footnotes can contain <strong>markup</strong></li>
|
||||
<li>
|
||||
<p>and other elements</p>
|
||||
<ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue