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/blocks.html
vendored
77
org/testdata/blocks.html
vendored
|
@ -61,27 +61,18 @@ are also supported
|
|||
note that /inline/ *markup* ignored
|
||||
</pre>
|
||||
<blockquote>
|
||||
<p>Mongodb is <strong>webscale</strong>. (source: <a href="http://www.mongodb-is-web-scale.com/">mongodb-is-web-scale</a>)</p>
|
||||
<p>
|
||||
Mongodb is <strong>webscale</strong>. (source: <a href="http://www.mongodb-is-web-scale.com/">mongodb-is-web-scale</a>)
|
||||
</p>
|
||||
<p>
|
||||
blocks like the quote block parse their content and can contain
|
||||
</p>
|
||||
blocks like the quote block parse their content and can contain</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
lists
|
||||
</p>
|
||||
<p>lists</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
inline <em>markup</em>
|
||||
</p>
|
||||
<p>inline <em>markup</em></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
tables
|
||||
</p>
|
||||
<p>tables</p>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
|
@ -97,18 +88,13 @@ tables
|
|||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
paragraphs
|
||||
</p>
|
||||
<p>paragraphs</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
…
|
||||
</p>
|
||||
<p>…</p>
|
||||
<p>
|
||||
whitespace is honored and not removed (but is not displayed because that's how html works by default)
|
||||
it can be made visible using css (e.g. <code class="verbatim">white-space: pre</code>).
|
||||
</p>
|
||||
it can be made visible using css (e.g. <code class="verbatim">white-space: pre</code>).</p>
|
||||
</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
|
@ -135,31 +121,21 @@ console.log("Hello World!")
|
|||
</script>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
list item 1
|
||||
blocks can contain unindented lines that would normally end a list item
|
||||
</p>
|
||||
<p>list item 1
|
||||
blocks can contain unindented lines that would normally end a list item</p>
|
||||
<pre class="example">
|
||||
this line is not indented - if it was outside of a block the list item would end
|
||||
</pre>
|
||||
<blockquote>
|
||||
<p>
|
||||
this line is not indented - if it was outside of a block the list item would end
|
||||
</p>
|
||||
<p>this line is not indented - if it was outside of a block the list item would end</p>
|
||||
</blockquote>
|
||||
<p>
|
||||
now we're outside the block again and the following unindented line will be outside of the list item
|
||||
</p>
|
||||
<p>now we're outside the block again and the following unindented line will be outside of the list item</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
this unindented line is outside of the list item
|
||||
</p>
|
||||
<p>this unindented line is outside of the list item</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
list item 2
|
||||
</p>
|
||||
<p>list item 2</p>
|
||||
<div class="src src-text">
|
||||
<div class="highlight">
|
||||
<pre>
|
||||
|
@ -167,9 +143,7 @@ list item 2
|
|||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
#+END_EXAMPLE
|
||||
</p>
|
||||
<p>#+END_EXAMPLE</p>
|
||||
<blockquote>
|
||||
<pre class="example">
|
||||
#+END_QUOTE
|
||||
|
@ -177,14 +151,10 @@ list item 2
|
|||
</blockquote>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
verse blocks
|
||||
</p>
|
||||
<p>verse blocks</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
emacs / ox-hugo rendering
|
||||
</p>
|
||||
<p>emacs / ox-hugo rendering</p>
|
||||
<p class="verse">
|
||||
Great clouds overhead<br />
|
||||
Tiny black birds rise and fall<br />
|
||||
|
@ -194,9 +164,7 @@ Snow covers Emacs<br />
|
|||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
go-org rendering
|
||||
</p>
|
||||
<p>go-org rendering</p>
|
||||
<div class="src src-html">
|
||||
<div class="highlight">
|
||||
<pre>
|
||||
|
@ -212,14 +180,11 @@ go-org rendering
|
|||
.verse-block p + p { margin: 0; }
|
||||
</style>
|
||||
<div class="verse-block">
|
||||
<p>
|
||||
Great clouds overhead
|
||||
<p>Great clouds overhead
|
||||
Tiny black birds rise and fall
|
||||
Snow covers Emacs
|
||||
</p>
|
||||
Snow covers Emacs</p>
|
||||
<p>
|
||||
—AlexSchroeder
|
||||
</p>
|
||||
—AlexSchroeder</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue