html: Remove cosmetic whitespace inside p tags
All tags are put on a line by themselves to help with visual diffing. Apparently this extra cosmetic whitespace causes problems inside p tags for ppl who want to use `white-space: pre`. Not much hurt for visual diffing in removing cosmetic whitespace for just p tags and can't think of anything that would break because of this right now. So let's do it and wait for things to break.
This commit is contained in:
parent
30dd2794cf
commit
a383eef7a6
15 changed files with 216 additions and 577 deletions
77
org/testdata/footnotes.html
vendored
77
org/testdata/footnotes.html
vendored
|
@ -11,70 +11,47 @@ Using some footnotes
|
|||
</h2>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
</ul>
|
||||
<h2 id="headline-2">
|
||||
Footnotes
|
||||
</h2>
|
||||
<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-8" href="#footnote-8">8</a></sup></p>
|
||||
<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-8" href="#footnote-8">8</a></sup>
|
||||
</p>
|
||||
<p>
|
||||
this is not part of <sup class="footnote-reference"><a id="footnote-reference-8" href="#footnote-8">8</a></sup> anymore as there are 2 blank lines in between!
|
||||
</p>
|
||||
this is not part of <sup class="footnote-reference"><a id="footnote-reference-8" href="#footnote-8">8</a></sup> anymore as there are 2 blank lines in between!</p>
|
||||
<div class="footnotes">
|
||||
<hr class="footnotes-separatator">
|
||||
<div class="footnote-definitions">
|
||||
<div class="footnote-definition">
|
||||
<sup id="footnote-1"><a href="#footnote-reference-1">1</a></sup>
|
||||
<div class="footnote-body">
|
||||
<p>
|
||||
<a href="https://www.example.com">https://www.example.com</a>
|
||||
</p>
|
||||
<p><a href="https://www.example.com">https://www.example.com</a></p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
footnotes can contain <strong>markup</strong>
|
||||
</p>
|
||||
<p>footnotes can contain <strong>markup</strong></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
and other elements
|
||||
</p>
|
||||
<p>and other elements</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
like blocks
|
||||
</p>
|
||||
<p>like blocks</p>
|
||||
<div class="src src-text">
|
||||
<div class="highlight">
|
||||
<pre>
|
||||
|
@ -84,9 +61,7 @@ other non-plain
|
|||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
and tables
|
||||
</p>
|
||||
<p>and tables</p>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
|
@ -114,41 +89,32 @@ and tables
|
|||
<div class="footnote-body">
|
||||
<p>
|
||||
Footnotes break after two consecutive empty lines - just like paragraphs - see <a href="https://orgmode.org/worg/dev/org-syntax.html.">https://orgmode.org/worg/dev/org-syntax.html.</a>
|
||||
This shouldn't happen when the definition line and the line after that are empty.
|
||||
</p>
|
||||
This shouldn't happen when the definition line and the line after that are empty.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footnote-definition">
|
||||
<sup id="footnote-3"><a href="#footnote-reference-3">3</a></sup>
|
||||
<div class="footnote-body">
|
||||
<p>
|
||||
yolo
|
||||
</p>
|
||||
<p>yolo</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footnote-definition">
|
||||
<sup id="footnote-4"><a href="#footnote-reference-4">4</a></sup>
|
||||
<div class="footnote-body">
|
||||
<p>
|
||||
the inline footnote definition
|
||||
</p>
|
||||
<p>the 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>
|
||||
the anonymous inline footnote definition
|
||||
</p>
|
||||
<p>the anonymous inline footnote definition</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footnote-definition">
|
||||
<sup id="footnote-6"><a href="#footnote-reference-6">6</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>
|
||||
<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">
|
||||
|
@ -156,8 +122,7 @@ Rather, it will be somewhere down below in the footnotes section.
|
|||
<div class="footnote-body">
|
||||
<p>
|
||||
There's multiple reasons for that. Among others, doing so requires i18n (to recognize the section) and silently
|
||||
hides content before and after the footnotes.
|
||||
</p>
|
||||
hides content before and after the footnotes.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue