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

@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"html" "html"
"log" "log"
"reflect"
"regexp" "regexp"
"strconv" "strconv"
"strings" "strings"
@ -415,8 +416,8 @@ func (w *HTMLWriter) WriteListItem(li ListItem) {
if li.Status != "" { if li.Status != "" {
attributes += fmt.Sprintf(` class="%s"`, listItemStatuses[li.Status]) attributes += fmt.Sprintf(` class="%s"`, listItemStatuses[li.Status])
} }
w.WriteString(fmt.Sprintf("<li%s>\n", attributes)) w.WriteString(fmt.Sprintf("<li%s>", attributes))
WriteNodes(w, li.Children...) w.writeListItemContent(li.Children)
w.WriteString("</li>\n") w.WriteString("</li>\n")
} }
@ -433,11 +434,26 @@ func (w *HTMLWriter) WriteDescriptiveListItem(di DescriptiveListItem) {
w.WriteString("?") w.WriteString("?")
} }
w.WriteString("\n</dt>\n") w.WriteString("\n</dt>\n")
w.WriteString("<dd>\n") w.WriteString("<dd>")
WriteNodes(w, di.Details...) w.writeListItemContent(di.Details)
w.WriteString("</dd>\n") w.WriteString("</dd>\n")
} }
func (w *HTMLWriter) writeListItemContent(children []Node) {
if isParagraphNodeSlice(children) {
for i, c := range children {
out := w.WriteNodesAsString(c.(Paragraph).Children...)
if i != 0 && out != "" {
w.WriteString("\n")
}
w.WriteString(out)
}
} else {
w.WriteString("\n")
WriteNodes(w, children...)
}
}
func (w *HTMLWriter) WriteParagraph(p Paragraph) { func (w *HTMLWriter) WriteParagraph(p Paragraph) {
if len(p.Children) == 0 { if len(p.Children) == 0 {
return return
@ -585,6 +601,15 @@ func setHTMLAttribute(attributes []h.Attribute, k, v string) []h.Attribute {
return append(attributes, h.Attribute{Namespace: "", Key: k, Val: v}) return append(attributes, h.Attribute{Namespace: "", Key: k, Val: v})
} }
func isParagraphNodeSlice(ns []Node) bool {
for _, n := range ns {
if reflect.TypeOf(n).Name() != "Paragraph" {
return false
}
}
return true
}
func (fs *footnotes) add(f FootnoteLink) int { func (fs *footnotes) add(f FootnoteLink) int {
if i, ok := fs.mapping[f.Name]; ok && f.Name != "" { if i, ok := fs.mapping[f.Name]; ok && f.Name != "" {
return i return i

View file

@ -68,12 +68,8 @@ note that /inline/ *markup* ignored
<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> <ul>
<li> <li>lists</li>
<p>lists</p> <li>inline <em>markup</em></li>
</li>
<li>
<p>inline <em>markup</em></p>
</li>
<li> <li>
<p>tables</p> <p>tables</p>
<table> <table>
@ -90,15 +86,11 @@ blocks like the quote block parse their content and can contain</p>
</tbody> </tbody>
</table> </table>
</li> </li>
<li> <li>paragraphs</li>
<p>paragraphs</p> <li>
</li>
<li>
<p></p>
<p>
whitespace is honored and not removed (but is not displayed because that&#39;s how html works by default) whitespace is honored and not removed (but is not displayed because that&#39;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>).</li>
</li>
</ul> </ul>
</blockquote> </blockquote>
<div class="src src-org"> <div class="src src-org">

View file

@ -12,25 +12,13 @@ Using some footnotes
</h2> </h2>
<div id="outline-text-headline-1" class="outline-text-2"> <div id="outline-text-headline-1" class="outline-text-2">
<ul> <ul>
<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>
<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>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> <li>inline footnotes are also supported via <sup class="footnote-reference"><a id="footnote-reference-4" href="#footnote-4">4</a></sup>.</li>
<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>
<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>Footnote definitions are not printed where they appear.
</li> 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> <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>
<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>
</ul> </ul>
</div> </div>
</div> </div>
@ -52,9 +40,7 @@ this is not part of <sup class="footnote-reference"><a id="footnote-reference-8"
<div class="footnote-body"> <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> <ul>
<li> <li>footnotes can contain <strong>markup</strong></li>
<p>footnotes can contain <strong>markup</strong></p>
</li>
<li> <li>
<p>and other elements</p> <p>and other elements</p>
<ul> <ul>

View file

@ -18,20 +18,12 @@ Title <sup class="footnote-reference"><a id="footnote-reference-1" href="#footno
<p>this test file just exists to reproduce a bug with footnotes in headlines - that only happens in very specific circumstances. <p>this test file just exists to reproduce a bug with footnotes in headlines - that only happens in very specific circumstances.
The TLDR is:</p> The TLDR is:</p>
<ul> <ul>
<li> <li>HTMLWriter.footnotes should be a pointer field. I didn&#39;t notice my error as go translated my pointer-method calls on
<p>HTMLWriter.footnotes should be a pointer field. I didn&#39;t notice my error as go translated my pointer-method calls on non-pointer values rather than complaining - i.e. <code class="verbatim">footnotes.add()</code> transparently gets translated to <code class="verbatim">(&amp;footnotes).add()</code> (<a href="https://golang.org/ref/spec#Calls">docs</a>).</li>
non-pointer values rather than complaining - i.e. <code class="verbatim">footnotes.add()</code> transparently gets translated to <code class="verbatim">(&amp;footnotes).add()</code> (<a href="https://golang.org/ref/spec#Calls">docs</a>).</p> <li>Headlines have to be htmlified twice - once for the outline and once for the headline itself. To do so we have to copy the writer</li>
</li> <li>Copying the writer copies footnotes - which contains a map and a slice. Changes to the map will always be reflected in the original map.
<li> Changes to the slice will only be reflected if the slice doesn&#39;t grow.</li>
<p>Headlines have to be htmlified twice - once for the outline and once for the headline itself. To do so we have to copy the writer</p> <li>We can thus end up with a footnote being in the mapping but not the slice - and get an index out of range error.</li>
</li>
<li>
<p>Copying the writer copies footnotes - which contains a map and a slice. Changes to the map will always be reflected in the original map.
Changes to the slice will only be reflected if the slice doesn&#39;t grow.</p>
</li>
<li>
<p>We can thus end up with a footnote being in the mapping but not the slice - and get an index out of range error.</p>
</li>
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -22,17 +22,11 @@ Simple Headline <code class="statistic">[1/2]</code>
</h2> </h2>
<div id="outline-text-headline-1" class="outline-text-2"> <div id="outline-text-headline-1" class="outline-text-2">
<ul> <ul>
<li class="checked"> <li class="checked">checked</li>
<p>checked</p> <li class="unchecked">unchecked</li>
</li> <li>note that statistic tokens are marked up anywhere
<li class="unchecked">
<p>unchecked</p>
</li>
<li>
<p>note that statistic tokens are marked up anywhere
not just where they are actually meant to be - even here &gt; <code class="statistic">[100%]</code> &lt; not just where they are actually meant to be - even here &gt; <code class="statistic">[100%]</code> &lt;
(Org mode proper does the same)</p> (Org mode proper does the same)</li>
</li>
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -1,115 +1,57 @@
<ul> <ul>
<li> <li><em>emphasis</em> and a hard line break <br>
<p><em>emphasis</em> and a hard line break <br>
see? <br> see? <br>
also hard line breaks not followed by a newline get ignored, see \\</p> also hard line breaks not followed by a newline get ignored, see \\</li>
</li> <li><em>.emphasis with dot border chars.</em></li>
<li> <li><em>emphasis with a slash/inside</em></li>
<p><em>.emphasis with dot border chars.</em></p> <li><em>emphasis</em> followed by raw text with slash /</li>
</li> <li>-&gt;/not an emphasis/&lt;-</li>
<li> <li>links with slashes do not become <em>emphasis</em>: <a href="https://somelinkshouldntrenderaccidentalemphasis.com">https://somelinkshouldntrenderaccidentalemphasis.com</a>/ <em>emphasis</em></li>
<p><em>emphasis with a slash/inside</em></p> <li><span style="text-decoration: underline;">underlined</span> <strong>bold</strong> <code class="verbatim">verbatim</code> <code>code</code> <del>strikethrough</del></li>
</li> <li><strong>bold string with an *asterisk inside</strong></li>
<li> <li>inline source blocks like <div class="src src-inline src-html">
<p><em>emphasis</em> followed by raw text with slash /</p>
</li>
<li>
<p>-&gt;/not an emphasis/&lt;-</p>
</li>
<li>
<p>links with slashes do not become <em>emphasis</em>: <a href="https://somelinkshouldntrenderaccidentalemphasis.com">https://somelinkshouldntrenderaccidentalemphasis.com</a>/ <em>emphasis</em></p>
</li>
<li>
<p><span style="text-decoration: underline;">underlined</span> <strong>bold</strong> <code class="verbatim">verbatim</code> <code>code</code> <del>strikethrough</del></p>
</li>
<li>
<p><strong>bold string with an *asterisk inside</strong></p>
</li>
<li>
<p>inline source blocks like <div class="src src-inline src-html">
<div class="highlight-inline"> <div class="highlight-inline">
<pre> <pre>
&lt;h1&gt;hello&lt;/h1&gt; &lt;h1&gt;hello&lt;/h1&gt;
</pre> </pre>
</div> </div>
</div></p> </div></li>
</li> <li>inline export blocks <h1>hello</h1></li>
<li> <li><code class="verbatim">multiline emphasis is
<p>inline export blocks <h1>hello</h1></p>
</li>
<li>
<p><code class="verbatim">multiline emphasis is
supported - and respects MaxEmphasisNewLines (default: 1)</code> supported - and respects MaxEmphasisNewLines (default: 1)</code>
<em>so this <em>so this
is emphasized</em></p> is emphasized</em>
<p>
/but /but
this this
is is
not emphasized/</p> not emphasized/</li>
</li> <li>empty emphasis markers like ++ // __ and so on are ignored</li>
<li> <li>use _{} for subscript<sub>sub</sub> and ^{} for superscript<sup>super</sup></li>
<p>empty emphasis markers like ++ // __ and so on are ignored</p>
</li>
<li>
<p>use _{} for subscript<sub>sub</sub> and ^{} for superscript<sup>super</sup></p>
</li>
<li> <li>
<p>links</p> <p>links</p>
<ol> <ol>
<li> <li>regular link <a href="https://example.com">https://example.com</a> link without description</li>
<p>regular link <a href="https://example.com">https://example.com</a> link without description</p> <li>regular link <a href="https://example.com">example.com</a> link with description</li>
</li> <li>regular link to a file (image) <img src="my-img.png" alt="my-img.png" title="my-img.png" /></li>
<li> <li>regular link to an org file (extension replaced with html) <a href="inline.html">inline.html</a> / <a href="../testdata/inline.html">../testdata/inline.html</a></li>
<p>regular link <a href="https://example.com">example.com</a> link with description</p> <li>regular link to a file (video) <video src="my-video.mp4" title="my-video.mp4">my-video.mp4</video></li>
</li> <li>regular link to http (image) <img src="http://placekitten.com/200/200#.png" alt="http://placekitten.com/200/200#.png" title="http://placekitten.com/200/200#.png" /></li>
<li> <li>regular link to https (image) <img src="https://placekitten.com/200/200#.png" alt="https://placekitten.com/200/200#.png" title="https://placekitten.com/200/200#.png" /></li>
<p>regular link to a file (image) <img src="my-img.png" alt="my-img.png" title="my-img.png" /></p> <li>regular link with image as description <a href="https://placekitten.com"><img src="https://placekitten.com/200/200#.png" alt="https://placekitten.com/200/200#.png" /></a></li>
</li> <li>regular link enclosed in [] [<a href="https://www.example.com">https://www.example.com</a>] [<a href="https://www.example.com">example.com</a>]</li>
<li> <li>auto link, i.e. not inside <code class="verbatim">\[[square brackets]\]</code> <a href="https://www.example.com">https://www.example.com</a></li>
<p>regular link to an org file (extension replaced with html) <a href="inline.html">inline.html</a> / <a href="../testdata/inline.html">../testdata/inline.html</a></p>
</li>
<li>
<p>regular link to a file (video) <video src="my-video.mp4" title="my-video.mp4">my-video.mp4</video></p>
</li>
<li>
<p>regular link to http (image) <img src="http://placekitten.com/200/200#.png" alt="http://placekitten.com/200/200#.png" title="http://placekitten.com/200/200#.png" /></p>
</li>
<li>
<p>regular link to https (image) <img src="https://placekitten.com/200/200#.png" alt="https://placekitten.com/200/200#.png" title="https://placekitten.com/200/200#.png" /></p>
</li>
<li>
<p>regular link with image as description <a href="https://placekitten.com"><img src="https://placekitten.com/200/200#.png" alt="https://placekitten.com/200/200#.png" /></a></p>
</li>
<li>
<p>regular link enclosed in [] [<a href="https://www.example.com">https://www.example.com</a>] [<a href="https://www.example.com">example.com</a>]</p>
</li>
<li>
<p>auto link, i.e. not inside <code class="verbatim">\[[square brackets]\]</code> <a href="https://www.example.com">https://www.example.com</a></p>
</li>
</ol> </ol>
</li> </li>
<li> <li>
<p>timestamps</p> <p>timestamps</p>
<ul> <ul>
<li> <li><span class="timestamp">&lt;2019-01-06 Sun&gt;</span></li>
<p><span class="timestamp">&lt;2019-01-06 Sun&gt;</span></p> <li><span class="timestamp">&lt;2019-01-06 Sun&gt;</span></li>
</li> <li><span class="timestamp">&lt;2019-01-06 Sun 18:00&gt;</span></li>
<li> <li><span class="timestamp">&lt;2019-01-06 Sun 18:00 +1w&gt;</span></li>
<p><span class="timestamp">&lt;2019-01-06 Sun&gt;</span></p> <li><span class="timestamp">&lt;2019-01-06 Sun 18:00&gt;</span></li>
</li> <li><span class="timestamp">&lt;2019-01-06 Sun 18:00 +1w&gt;</span></li>
<li>
<p><span class="timestamp">&lt;2019-01-06 Sun 18:00&gt;</span></p>
</li>
<li>
<p><span class="timestamp">&lt;2019-01-06 Sun 18:00 +1w&gt;</span></p>
</li>
<li>
<p><span class="timestamp">&lt;2019-01-06 Sun 18:00&gt;</span></p>
</li>
<li>
<p><span class="timestamp">&lt;2019-01-06 Sun 18:00 +1w&gt;</span></p>
</li>
</ul> </ul>
</li> </li>
<li> <li>

View file

@ -1,27 +1,13 @@
<p>without latex delimiters the <code class="verbatim">_{i=1}</code> in <code class="verbatim">\sum_{i=1}^n a_n</code> is interpreted as subscript. <p>without latex delimiters the <code class="verbatim">_{i=1}</code> in <code class="verbatim">\sum_{i=1}^n a_n</code> is interpreted as subscript.
we support <code class="verbatim">\(...\)</code>, <code class="verbatim">\[...\]</code>, <code class="verbatim">$$...$$</code> and <code class="verbatim">\begin{$env}...\end{$env}</code> as latex fragment delimiters.</p> we support <code class="verbatim">\(...\)</code>, <code class="verbatim">\[...\]</code>, <code class="verbatim">$$...$$</code> and <code class="verbatim">\begin{$env}...\end{$env}</code> as latex fragment delimiters.</p>
<ul> <ul>
<li> <li><sub>i=1</sub>^n a_n (without latex delimiter)</li>
<p><sub>i=1</sub>^n a_n (without latex delimiter)</p> <li>\(\sum_{i=1}^n a_n\)</li>
</li> <li>\[\sum_{i=1}^n a_n\]</li>
<li> <li>$$\sum_{i=1}^n a_n$$</li>
<p>\(\sum_{i=1}^n a_n\)</p> <li>\begin{xyz}\sum_{i=1}^n a_n\end{xyz}</li>
</li> <li>\begin{xyz}
<li>
<p>\[\sum_{i=1}^n a_n\]</p>
</li>
<li>
<p>$$\sum_{i=1}^n a_n$$</p>
</li>
<li>
<p>\begin{xyz}\sum_{i=1}^n a_n\end{xyz}</p>
</li>
<li>
<p>\begin{xyz}
\sum_{i=1}^n a_n \sum_{i=1}^n a_n
\end{xyz}</p> \end{xyz}</li>
</li> <li>$2 + 2$, $3 - 3$</li>
<li>
<p>$2 + 2$, $3 - 3$</p>
</li>
</ul> </ul>

View file

@ -1,36 +1,24 @@
<ul> <ul>
<li class="unchecked"> <li class="unchecked">unordered list item 1</li>
<p>unordered list item 1</p>
</li>
<li> <li>
<p>
list item with empty first and second line <br> 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</li>
</li>
<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> <ol>
<li class="indeterminate"> <li class="indeterminate">
<p>ordered sublist item 1</p> <p>ordered sublist item 1</p>
<ol> <ol>
<li class="checked"> <li class="checked">ordered sublist item 1</li>
<p>ordered sublist item 1</p> <li class="unchecked">ordered sublist item 2</li>
</li> <li class="checked">ordered sublist item 3</li>
<li class="unchecked">
<p>ordered sublist item 2</p>
</li>
<li class="checked">
<p>ordered sublist item 3</p>
</li>
</ol> </ol>
</li> </li>
<li>ordered sublist item 2</li>
<li> <li>
<p>ordered sublist item 2</p>
</li> list item with empty first and second line - see above</li>
<li>
<p>
list item with empty first and second line - see above</p>
</li>
</ol> </ol>
</li> </li>
<li class="checked"> <li class="checked">
@ -85,23 +73,17 @@ descriptive lists</p>
<dt class="unchecked"> <dt class="unchecked">
term term
</dt> </dt>
<dd> <dd>details
<p>details continued details</dd>
continued details</p>
</dd>
<dt class="unchecked"> <dt class="unchecked">
? ?
</dt> </dt>
<dd> <dd>details without a term</dd>
<p>details without a term</p>
</dd>
<dt class="checked"> <dt class="checked">
term term
</dt> </dt>
<dd> <dd>
<p> details on a new line</dd>
details on a new line</p>
</dd>
<dt> <dt>
term term
</dt> </dt>
@ -120,89 +102,51 @@ echo &#34;Hello World!&#34;
</dl> </dl>
<p>some list termination tests</p> <p>some list termination tests</p>
<ul> <ul>
<li> <li>unordered 1</li>
<p>unordered 1</p> <li>unordered 2</li>
</li>
<li>
<p>unordered 2</p>
</li>
</ul> </ul>
<ol> <ol>
<li> <li>ordered 1</li>
<p>ordered 1</p> <li>ordered 2</li>
</li>
<li>
<p>ordered 2</p>
</li>
</ol> </ol>
<ol> <ol>
<li> <li>ordered 1</li>
<p>ordered 1</p> <li>ordered 2</li>
</li>
<li>
<p>ordered 2</p>
</li>
</ol> </ol>
<ul> <ul>
<li> <li>unordered 1</li>
<p>unordered 1</p> <li>unordered 2</li>
</li>
<li>
<p>unordered 2</p>
</li>
</ul> </ul>
<ol> <ol>
<li> <li>ordered 1</li>
<p>ordered 1</p> <li>ordered 2</li>
</li>
<li>
<p>ordered 2</p>
</li>
</ol> </ol>
<dl> <dl>
<dt> <dt>
unordered descriptive unordered descriptive
</dt> </dt>
<dd> <dd>1</dd>
<p>1</p>
</dd>
<dt> <dt>
unordered descriptive unordered descriptive
</dt> </dt>
<dd> <dd>2</dd>
<p>2</p>
</dd>
</dl> </dl>
<dl> <dl>
<dt> <dt>
ordered descriptive ordered descriptive
</dt> </dt>
<dd> <dd>1</dd>
<p>1</p>
</dd>
<dt> <dt>
ordered descriptive ordered descriptive
</dt> </dt>
<dd> <dd>2</dd>
<p>2</p>
</dd>
</dl> </dl>
<ul> <ul>
<li> <li>unordered 1</li>
<p>unordered 1</p> <li>unordered 2</li>
</li>
<li>
<p>unordered 2</p>
</li>
</ul> </ul>
<ol> <ol>
<li value="2"> <li value="2">use `[@n]` to change the value of list items</li>
<p>use `[@n]` to change the value of list items</p> <li class="unchecked">foobar</li>
</li> <li value="10" class="checked">that even works in combination with list statuses (`[ ]`)</li>
<li class="unchecked">
<p>foobar</p>
</li>
<li value="10" class="checked">
<p>that even works in combination with list statuses (`[ ]`)</p>
</li>
</ol> </ol>

View file

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