go-org-orgwiki/org/testdata/blocks.org

3.7 KiB

some results without a block
echo "a bash source block"

function hello {
    echo Hello World!
}

hello
block caption
a source block with leading newline, trailing newline characters
and a line started
  with leading space
	and line leading tab.
a source block without a language
echo a source block with results
a source block with results
a source block that only exports results
but the result block is
an example block with
multiple lines including


empty lines!

it also has multiple parameters

src, example & export blocks treat their content as raw text
/inline/ *markup* is ignored
      and whitespace is honored and not removed

content of example blocks is still html escaped - see <script>alert("escaped")</script>
examples like this
are also supported

note that /inline/ *markup* ignored

Mongodb is webscale. (source: mongodb-is-web-scale)

blocks like the quote block parse their content and can contain

  • lists
  • inline markup
  • tables

    foo
    bar
    baz
  • paragraphs
  • … whitespace is honored and not removed (but is not displayed because that's how html works by default) it can be made visible using css (e.g. white-space: pre).
  #+BEGIN_SRC bash
  echo src (with language org) and example blocks support escaping using commata
  #+END_SRC

,* I am not a real headline - commata escape characters aren't renderered
  #+BEGIN_SRC bash
  echo src (with language org) and example blocks support escaping using commata
  #+END_SRC

,* I am not a real headline - commata escape characters aren't renderered
  • list item 1 blocks can contain unindented lines that would normally end a list item

    this line is not indented - if it was outside of a block the list item would end
    

    this line is not indented - if it was outside of a block the list item would end

    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_EXAMPLE

    #+END_EXAMPLE

    #+END_QUOTE
    
  • verse blocks

    • emacs / ox-hugo rendering

      Great clouds overhead
      Tiny black birds rise and fall
      Snow covers Emacs

         ---AlexSchroeder

    • go-org rendering

      <style>
      .verse-block p { white-space: pre; }
      .verse-block p + p { margin: 0; }
      </style>

      Great clouds overhead Tiny black birds rise and fall Snow covers Emacs

      —AlexSchroeder