go-org-orgwiki/org/testdata/blocks.pretty_org
Niklas Fasching 42dc70e7ad Support blocks with unindented content
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.
2018-12-19 00:28:53 +01:00

68 lines
1.2 KiB
Text

#+CAPTION: block caption
#+BEGIN_SRC bash :results raw
echo "a bash source block"
function hello {
echo Hello World!
}
hello
#+END_SRC
#+BEGIN_SRC
a source block without a language
#+END_SRC
#+BEGIN_EXAMPLE foo bar baz
an example block with
multiple lines including
empty lines!
it also has multiple parameters
note that /inline/ *markup* ignored
#+END_EXAMPLE
: examples like this
: are also supported
: note that /inline/ *markup* ignored
#+BEGIN_QUOTE
Mongodb is *webscale*. (source: [[http://www.mongodb-is-web-scale.com/][mongodb-is-web-scale]])
blocks can contain other elements like
- lists
- inline /markup/
- tables
| foo |
| bar |
| baz |
- paragraphs
- ...
#+END_QUOTE
#+BEGIN_EXPORT html
<script>
console.log("Hello World!")
</script>
#+END_EXPORT
- list item 1
blocks can contain unindented lines that would normally end a list item
#+BEGIN_EXAMPLE
this line is not indented - if it was outside of a block the list item would end
#+END_EXAMPLE
now we're outside the block again and the following unindented line will be outside of the list item
this unindented line is outside of the list item
- list item 2
#+BEGIN_SRC
#+BEGIN_EXAMPLE
#+END_SRC
#+END_EXAMPLE
#+BEGIN_QUOTE
#+BEGIN_EXAMPLE
#+END_QUOTE
#+END_EXAMPLE