list items only contain content that is indented to their respective level. Except when that content is inside a block. To allow for this we have to ignore the parentStop when parsing a block and just include everything until the end of that block. Can't think of any problems with this right now. Let's see if this comes back to bite me.
126 lines
1.6 KiB
HTML
126 lines
1.6 KiB
HTML
<figure>
|
|
<div class="highlight">
|
|
<pre>
|
|
echo "a bash source block"
|
|
|
|
function hello {
|
|
echo Hello World!
|
|
}
|
|
|
|
hello
|
|
</pre>
|
|
</div>
|
|
<figcaption>
|
|
block caption
|
|
</figcaption>
|
|
</figure>
|
|
<div class="highlight">
|
|
<pre>
|
|
a source block without a language
|
|
</pre>
|
|
</div>
|
|
<pre class="example">
|
|
an example block with
|
|
multiple lines including
|
|
|
|
|
|
empty lines!
|
|
|
|
it also has multiple parameters
|
|
|
|
note that /inline/ *markup* ignored
|
|
</pre>
|
|
<pre class="example">
|
|
examples like this
|
|
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>
|
|
blocks can contain other elements like
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<p>
|
|
lists
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
inline <em>markup</em>
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
tables
|
|
</p>
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td>foo</td>
|
|
</tr>
|
|
<tr>
|
|
<td>bar</td>
|
|
</tr>
|
|
<tr>
|
|
<td>baz</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
paragraphs
|
|
</p>
|
|
</li>
|
|
<li>
|
|
<p>
|
|
…
|
|
</p>
|
|
</li>
|
|
</ul>
|
|
</blockquote>
|
|
<script>
|
|
console.log("Hello World!")
|
|
</script>
|
|
<ul>
|
|
<li>
|
|
<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>
|
|
<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>
|
|
<ul>
|
|
<li>
|
|
<p>
|
|
list item 2
|
|
</p>
|
|
<div class="highlight">
|
|
<pre>
|
|
#+BEGIN_EXAMPLE
|
|
</pre>
|
|
</div>
|
|
<p>
|
|
#+END_EXAMPLE
|
|
</p>
|
|
<p>
|
|
#+BEGIN_QUOTE
|
|
</p>
|
|
<pre class="example">
|
|
#+END_QUOTE
|
|
</pre>
|
|
</li>
|
|
</ul>
|