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:
Ori 2021-06-22 16:57:09 -04:00 committed by Niklas Fasching
parent 429602aba7
commit 4d3a099922
9 changed files with 146 additions and 319 deletions

View file

@ -274,21 +274,11 @@ jobs:
</h4>
<div id="outline-text-headline-8" class="outline-text-4">
<ul>
<li>
<p>ndash </p>
</li>
<li>
<p>mdash —</p>
</li>
<li>
<p>ellipsis …</p>
</li>
<li>
<p>acute Á and so on</p>
</li>
<li>
<p>note that —— is replaced with 2 mdashes and …. becomes ellipsis+. and so on - that&#39;s how org also does it</p>
</li>
<li>ndash </li>
<li>mdash —</li>
<li>ellipsis …</li>
<li>acute Á and so on</li>
<li>note that —— is replaced with 2 mdashes and …. becomes ellipsis+. and so on - that&#39;s how org also does it</li>
</ul>
</div>
</div>
@ -310,27 +300,19 @@ or <code>that</code> foo.</p>
</h4>
<div id="outline-text-headline-10" class="outline-text-4">
<ul>
<li>
<p>this list item
<li>this list item
has
multiple
linbreaks - but it&#39;s still just one paragraph (i.e. no line breaks are rendered)</p>
</li>
<li>
<p>foobar</p>
</li>
linbreaks - but it&#39;s still just one paragraph (i.e. no line breaks are rendered)</li>
<li>foobar</li>
</ul>
<ol>
<li>
<p>same
<li>same
goes
for
ordered
lists</p>
</li>
<li>
<p>foo</p>
</li>
lists</li>
<li>foo</li>
</ol>
</div>
</div>
@ -364,9 +346,7 @@ lists</p>
<li>
<p>bullet 1</p>
<ul>
<li>
<p>sub bullet</p>
</li>
<li>sub bullet</li>
</ul>
</li>
</ul>
@ -438,18 +418,12 @@ Bar
<div id="outline-text-headline-21" class="outline-text-4">
<p>just like #46</p>
<ul>
<li>
<p><code class="verbatim">--</code> -&gt; (en dash)</p>
</li>
<li>
<p><code class="verbatim">---</code> -&gt; — (em dash)</p>
</li>
<li><code class="verbatim">--</code> -&gt; (en dash)</li>
<li><code class="verbatim">---</code> -&gt; — (em dash)</li>
</ul>
<p>also, consecutive dashes inside</p>
<ul>
<li>
<p>inline code <code class="verbatim">--</code> <code class="verbatim">---</code> and verbatim <code>--</code> <code>---</code></p>
</li>
<li>inline code <code class="verbatim">--</code> <code class="verbatim">---</code> and verbatim <code>--</code> <code>---</code></li>
<li>
<p>src/example/export blocks should not be converted!</p>
<div class="src src-sh">
@ -579,9 +553,7 @@ list items don&#39;t end on child headline
</h4>
<div id="outline-text-headline-31" class="outline-text-4">
<ul>
<li>
<p>a list item</p>
</li>
<li>a list item</li>
</ul>
<div id="outline-container-headline-32" class="outline-5">
<h5 id="headline-32">
@ -589,9 +561,7 @@ followed by a child headline
</h5>
<div id="outline-text-headline-32" class="outline-text-5">
<ul>
<li>
<p>followed by another list item</p>
</li>
<li>followed by another list item</li>
</ul>
</div>
</div>
@ -612,12 +582,8 @@ Footnotes
<div class="footnote-body">
<p>a footnote <em>with</em> <strong>markup</strong></p>
<ul>
<li>
<p>and a <strong>list</strong></p>
</li>
<li>
<p>because that&#39;s possible</p>
</li>
<li>and a <strong>list</strong></li>
<li>because that&#39;s possible</li>
</ul>
</div>
</div>