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:
Niklas Fasching 2020-06-26 18:53:57 +02:00
parent 30dd2794cf
commit a383eef7a6
15 changed files with 216 additions and 577 deletions

View file

@ -1,64 +1,44 @@
<ul>
<li class="unchecked">
<p>
unordered list item 1
</p>
<p>unordered list item 1</p>
</li>
<li>
<p>
list item with empty first and second line <br>
normally an empty line breaks the list item - but we make an exception for the first line and don&#39;t count it towards that limit
</p>
normally an empty line breaks the list item - but we make an exception for the first line and don&#39;t count it towards that limit</p>
</li>
<li>
<p>
unordered list item 2 - with <code>inline</code> <em>markup</em>
</p>
<p>unordered list item 2 - with <code>inline</code> <em>markup</em></p>
<ol>
<li class="indeterminate">
<p>
ordered sublist item 1
</p>
<p>ordered sublist item 1</p>
<ol>
<li class="checked">
<p>
ordered sublist item 1
</p>
<p>ordered sublist item 1</p>
</li>
<li class="unchecked">
<p>
ordered sublist item 2
</p>
<p>ordered sublist item 2</p>
</li>
<li class="checked">
<p>
ordered sublist item 3
</p>
<p>ordered sublist item 3</p>
</li>
</ol>
</li>
<li>
<p>
ordered sublist item 2
</p>
<p>ordered sublist item 2</p>
</li>
<li>
<p>
list item with empty first and second line - see above
</p>
list item with empty first and second line - see above</p>
</li>
</ol>
</li>
<li class="checked">
<p>
unordered list item 3 - and a <a href="https://example.com">link</a>
and some lines of text
</p>
<p>unordered list item 3 - and a <a href="https://example.com">link</a>
and some lines of text</p>
<ol>
<li>
<p>
and another subitem
</p>
<p>and another subitem</p>
<div class="src src-sh">
<div class="highlight">
<pre>
@ -68,9 +48,7 @@ echo with a block
</div>
</li>
<li>
<p>
and another one with a table
</p>
<p>and another one with a table</p>
<table>
<thead>
<tr>
@ -88,15 +66,12 @@ and another one with a table
</tbody>
</table>
<p>
and text with an empty line in between as well!
</p>
and text with an empty line in between as well!</p>
</li>
</ol>
</li>
<li>
<p>
unordered list item 4
</p>
<p>unordered list item 4</p>
<pre class="example">
with an example
@ -105,33 +80,27 @@ that spans multiple lines
</li>
</ul>
<p>
descriptive lists
</p>
descriptive lists</p>
<dl>
<dt class="unchecked">
term
</dt>
<dd>
<p>
details
continued details
</p>
<p>details
continued details</p>
</dd>
<dt class="unchecked">
?
</dt>
<dd>
<p>
details without a term
</p>
<p>details without a term</p>
</dd>
<dt class="checked">
term
</dt>
<dd>
<p>
details on a new line
</p>
details on a new line</p>
</dd>
<dt>
term
@ -139,8 +108,7 @@ term
<dd>
<p>
details on a new line (with an empty line in between)
<strong>continued</strong>
</p>
<strong>continued</strong></p>
<div class="src src-bash">
<div class="highlight">
<pre>
@ -150,67 +118,45 @@ echo &#34;Hello World!&#34;
</div>
</dd>
</dl>
<p>
some list termination tests
</p>
<p>some list termination tests</p>
<ul>
<li>
<p>
unordered 1
</p>
<p>unordered 1</p>
</li>
<li>
<p>
unordered 2
</p>
<p>unordered 2</p>
</li>
</ul>
<ol>
<li>
<p>
ordered 1
</p>
<p>ordered 1</p>
</li>
<li>
<p>
ordered 2
</p>
<p>ordered 2</p>
</li>
</ol>
<ol>
<li>
<p>
ordered 1
</p>
<p>ordered 1</p>
</li>
<li>
<p>
ordered 2
</p>
<p>ordered 2</p>
</li>
</ol>
<ul>
<li>
<p>
unordered 1
</p>
<p>unordered 1</p>
</li>
<li>
<p>
unordered 2
</p>
<p>unordered 2</p>
</li>
</ul>
<ol>
<li>
<p>
ordered 1
</p>
<p>ordered 1</p>
</li>
<li>
<p>
ordered 2
</p>
<p>ordered 2</p>
</li>
</ol>
<dl>
@ -218,17 +164,13 @@ ordered 2
unordered descriptive
</dt>
<dd>
<p>
1
</p>
<p>1</p>
</dd>
<dt>
unordered descriptive
</dt>
<dd>
<p>
2
</p>
<p>2</p>
</dd>
</dl>
<dl>
@ -236,28 +178,20 @@ unordered descriptive
ordered descriptive
</dt>
<dd>
<p>
1
</p>
<p>1</p>
</dd>
<dt>
ordered descriptive
</dt>
<dd>
<p>
2
</p>
<p>2</p>
</dd>
</dl>
<ul>
<li>
<p>
unordered 1
</p>
<p>unordered 1</p>
</li>
<li>
<p>
unordered 2
</p>
<p>unordered 2</p>
</li>
</ul>