- add return link from footnote definitions -> footnote reference - wrap footnote definition content in div for easier styling - class rather than id bc idk consistency
367 lines
7.3 KiB
HTML
367 lines
7.3 KiB
HTML
<h1>Motivation</h1>
|
|
<p>
|
|
To validate the parser we'll try printing the AST back to org-mode source - if that
|
|
works we can be kind of sure that the parsing worked.
|
|
At least I hope so - I would like to get around writing tests for the individual parsing
|
|
functions...
|
|
</p>
|
|
<h2>Paragraphs</h2>
|
|
<p>
|
|
Empty lines separate paragraphs.
|
|
</p>
|
|
<p>
|
|
Right?
|
|
</p>
|
|
<p>
|
|
They do!
|
|
</p>
|
|
<h2>Headlines with TODO status, priority & tags</h2>
|
|
<h3>Headline with todo status & priority</h3>
|
|
<h3>Headline with TODO status</h3>
|
|
<h3>Headline with tags & priority</h3>
|
|
<p>
|
|
this one is cheating a little as tags are ALWAYS printed right aligned to a given column number...
|
|
</p>
|
|
<h2>Lists</h2>
|
|
<ul>
|
|
<li>
|
|
<p>
|
|
unordered list item 1
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
unordered list item 2 - with <code>inline</code> <em>markup</em>
|
|
</p>
|
|
<ol>
|
|
<li>
|
|
<p>
|
|
ordered sublist item 1
|
|
</p>
|
|
<ol>
|
|
<li>
|
|
<p>
|
|
ordered sublist item 1
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
ordered sublist item 2
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
ordered sublist item 3
|
|
</p>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
ordered sublist item 2
|
|
</p>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
<li>
|
|
<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>
|
|
<div class="highlight"><pre>echo with a block</pre></div>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
and another one with a table
|
|
</p>
|
|
<table>
|
|
<thead>
|
|
<th>a</th><th>b</th><th>c</th>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>1</td><td>2</td><td>3</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>
|
|
and text with an empty line in between as well!
|
|
</p>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
unordered list item 4
|
|
</p>
|
|
</li>
|
|
</ul>
|
|
<h2>Inline</h2>
|
|
<ul>
|
|
<li>
|
|
<p>
|
|
<em>emphasis</em> and a hard line break <br>
|
|
|
|
see?
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
<em>.emphasis with dot border chars.</em>
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
<em>emphasis with a slash/inside</em>
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
<em>emphasis</em> followed by raw text with slash /
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
->/not an emphasis/<-
|
|
</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>
|
|
links
|
|
</p>
|
|
<ol>
|
|
<li>
|
|
<p>
|
|
regular link <a href="https://example.com">https://example.com</a> link without description
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
regular link <a href="https://example.com">example.com</a> link with description
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
regular link to a file (image) <img src="my-img.png" alt="file:my-img.png" title="file:my-img.png" />
|
|
</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>
|
|
</li>
|
|
</ul>
|
|
<h2>blocks</h2>
|
|
<div class="highlight"><pre>echo a bash source block</pre></div>
|
|
<div class="highlight"><pre>a source block without a language
|
|
and a second line
|
|
and a third one</pre></div>
|
|
<pre class="example">
|
|
an example block
|
|
with multiple lines
|
|
</pre>
|
|
<blockquote>
|
|
<p>
|
|
Mongodb is very webscale
|
|
</p>
|
|
<p>
|
|
and quote blocks can contain multiple paragraphs
|
|
</p>
|
|
</blockquote>
|
|
<h2>issues from goorgeous (free test cases, yay!)</h2>
|
|
<h3><a href="https://github.com/chaseadamsio/goorgeous/issues/29">#29:</a> Support verse block</h3>
|
|
<div class="verse-block">
|
|
<p>
|
|
This
|
|
<strong>is</strong>
|
|
verse
|
|
</p>
|
|
</div>
|
|
<div class="custom-block">
|
|
<p>
|
|
or even a <strong>totally</strong> <em>custom</em> kind of block
|
|
crazy ain't it?
|
|
</p>
|
|
</div>
|
|
<h3><a href="https://github.com/chaseadamsio/goorgeous/issues/47">#47:</a> Consecutive <code>code</code> wrapped text gets joined</h3>
|
|
<p>
|
|
either <code>this</code> or <code>that</code> foo.
|
|
either <code>this</code>
|
|
or <code>that</code> foo.
|
|
</p>
|
|
<h3><a href="https://github.com/chaseadamsio/goorgeous/issues/68">#68</a>: Quote block with inline markup</h3>
|
|
<blockquote>
|
|
<p>
|
|
<a href="https://www.example.com"><em>this</em> <strong>is</strong> <span style="text-decoration: underline;">markup</span>!</a>
|
|
</p>
|
|
</blockquote>
|
|
<h3><a href="https://github.com/chaseadamsio/goorgeous/issues/77">#77</a>: Recognize <code class="verbatim">code</code>--- as code plus dash</h3>
|
|
<h3><a href="https://github.com/chaseadamsio/goorgeous/issues/75">#75</a>: Not parsing nested lists correctly</h3>
|
|
<ul>
|
|
<li>
|
|
<p>
|
|
bullet 1
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<p>
|
|
sub bullet
|
|
</p>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h3><a href="https://github.com/chaseadamsio/goorgeous/issues/78">#78</a>: Emphasis at beginning of line</h3>
|
|
<p>
|
|
<em>italics</em>
|
|
</p>
|
|
<p>
|
|
Text
|
|
<em>italics</em>
|
|
</p>
|
|
<h3><a href="https://github.com/chaseadamsio/goorgeous/issues/82">#82</a>: Crash on empty headline</h3>
|
|
<h4></h4>
|
|
<p>
|
|
just a space as title...
|
|
</p>
|
|
<h3><a href="https://github.com/chaseadamsio/goorgeous/issues/84">#84</a>: Paragraphs that are not followed by an empty line are not parsed correctly</h3>
|
|
<h4>Foo</h4>
|
|
<p>
|
|
Foo paragraph.
|
|
</p>
|
|
<h4>Bar</h4>
|
|
<p>
|
|
Bar paragraph
|
|
</p>
|
|
<h2>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-6" href="#footnote-6">6</a></sup>
|
|
</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>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
inline footnotes are also supported via <sup class="footnote-reference"><a id="footnote-reference-2" href="#footnote-2">2</a></sup>.
|
|
</p>
|
|
</li>
|
|
</ul>
|
|
<div class="footnotes">
|
|
<h1 class="footnotes-title">Footnotes</h1>
|
|
<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>
|
|
<ul>
|
|
<li>
|
|
<p>
|
|
footnotes can contain <strong>markup</strong>
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
and other elements
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<p>
|
|
like blocks
|
|
</p>
|
|
<div class="highlight"><pre>other non-plain</pre></div>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
and tables
|
|
</p>
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td>1</td><td>a</td>
|
|
</tr>
|
|
<tr>
|
|
<td>2</td><td>b</td>
|
|
</tr>
|
|
<tr>
|
|
<td>3</td><td>c</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="footnote-definition">
|
|
<sup id="footnote-3"><a href="#footnote-reference-3">3</a></sup>
|
|
<div class="footnote-body">
|
|
<p>
|
|
<a href="http://example.com/unused-footnote">example.com/unused-footnote</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="footnote-definition">
|
|
<sup id="footnote-4"><a href="#footnote-reference-4">4</a></sup>
|
|
<div class="footnote-body">
|
|
<p>
|
|
another unused footnote
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="footnote-definition">
|
|
<sup id="footnote-5"><a href="#footnote-reference-5">5</a></sup>
|
|
<div class="footnote-body">
|
|
<p>
|
|
another unused footnote
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="footnote-definition">
|
|
<sup id="footnote-6"><a href="#footnote-reference-6">6</a></sup>
|
|
<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>
|
|
</div>
|
|
</div>
|
|
<div class="footnote-definition">
|
|
<sup id="footnote-2"><a href="#footnote-reference-2">2</a></sup>
|
|
<div class="footnote-body">
|
|
<p>
|
|
the inline footnote definition
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|