Preformatting

Created on Oct. 25, 2012, 11:22 p.m. by Hevok & updated by Hevok on May 2, 2013, 5:12 p.m.

To include a preformatted, never-to-be-fiddled-with text (e.g. a code block) finish the prior paragraph with "::". The preformatted block finishes when the text falls back to the same indentation level as a paragraph prior to the preformatted block.

An example:

  Whitespace, newlines, blank lines, and all kinds of markup
    (like *this* or \this) is preserved by literal blocks.
Lookie here, I've dropped the indentation level
(but not far enough)

no more example

If a paragraph consists of only of "::", then it's removed from the output:

::

  This is preformatted text, and the
  last "::" paragraph is removed
This is preformatted text, and the
last "::" paragraph is removed
preformats.jpg

Tags: documentation, rest
Categories: Tutorial
Parent: reStructuredText

Update entry (Admin) | See changes

Comment on This Data Unit