go-org-orgwiki/org/testdata/example.html
2018-12-03 00:35:12 +01:00

341 lines
6.7 KiB
HTML

<h1>Motivation</h1>
<p>
To validate the parser we&#39;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>Headlines with TODO status, priority &amp; tags</h2>
<h3>Headline with todo status &amp; priority</h3>
<h3>Headline with TODO status</h3>
<h3>Headline with tags &amp; 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>
<code class="src src-sh">
<pre>echo with a block</pre>
</code>
</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>
-&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>
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>
<code class="src src-bash">
<pre>echo a bash source block</pre>
</code>
<code class="src src-text">
<pre>a source block without a language
and a second line
and a third one</pre>
</code>
<pre class="example">\nan example block
with multiple lines
</pre>
<blockquote>
Mongodb is very webscale
</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>
<p class="verse-block">
This
<strong>is</strong>
verse
</p>
<p class="custom-block">
or even a <strong>totally</strong> <em>custom</em> kind of block
crazy ain&#39;t it?
</p>
<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>
<a href="https://www.example.com"><em>this</em> <strong>is</strong> <span style="text-decoration: underline;">markup</span>!</a>
</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 href="#footnote-1">1</a></sup> <sup class="footnote-reference"><a href="#footnote-6">6</a></sup>
</p>
</li>
<li>
<p>
further references to the same footnote should not <sup class="footnote-reference"><a 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 href="#footnote-2">2</a></sup>.
</p>
</li>
</ul>
<div id="footnotes">
<h1 class="footnotes-title">Footnotes</h1>
<div class="footnote-definitions">
<div class="footnote-definition">
<sup id="footnote-1">1</sup>
<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>
<code class="src src-text">
<pre>other non-plain</pre>
</code>
</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 class="footnote-definition">
<sup id="footnote-3">3</sup>
<p>
<a href="http://example.com/unused-footnote">example.com/unused-footnote</a>
</p>
</div>
<div class="footnote-definition">
<sup id="footnote-4">4</sup>
<p>
another unused footnote
</p>
</div>
<div class="footnote-definition">
<sup id="footnote-5">5</sup>
<p>
another unused footnote
</p>
</div>
<div class="footnote-definition">
<sup id="footnote-6">6</sup>
<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&#39;t happen when the definition line and the line after that are empty.
</p>
</div>
<div class="footnote-definition">
<sup id="footnote-2">2</sup>
<p>
the inline footnote definition
</p>
</div>
</div>
</div>