summaryrefslogtreecommitdiff
path: root/doc/ext/appapi.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-01-07 19:19:58 +0100
committerGeorg Brandl <georg@python.org>2010-01-07 19:19:58 +0100
commit51261adf4a87e8e70838fd59fe51b031147a0d5a (patch)
tree2b356df7daeca84fa324bd69ae4e84cff7240ed2 /doc/ext/appapi.rst
parentbd97c900b5e07ad26393cdca2df38944c974eeee (diff)
parent995e1df9e1ca485f9b1b690fbb64bfc3d544f563 (diff)
downloadsphinx-51261adf4a87e8e70838fd59fe51b031147a0d5a.tar.gz
merge with trunk
Diffstat (limited to 'doc/ext/appapi.rst')
-rw-r--r--doc/ext/appapi.rst10
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/ext/appapi.rst b/doc/ext/appapi.rst
index 754f22eb..7ed3d3d4 100644
--- a/doc/ext/appapi.rst
+++ b/doc/ext/appapi.rst
@@ -56,9 +56,11 @@ the following public API:
given as keyword arguments: the keyword must be one or more of ``'html'``,
``'latex'``, ``'text'``, the value a 2-tuple of ``(visit, depart)`` methods.
``depart`` can be ``None`` if the ``visit`` function raises
- :exc:`docutils.nodes.SkipNode`. Example::
+ :exc:`docutils.nodes.SkipNode`. Example:
- class math(docutils.nodes.Element)
+ .. code-block:: python
+
+ class math(docutils.nodes.Element): pass
def visit_math_html(self, node):
self.body.append(self.starttag(node, 'math'))
@@ -98,7 +100,9 @@ the following public API:
support directive classes otherwise).
For example, the (already existing) :dir:`literalinclude` directive would be
- added like this::
+ added like this:
+
+ .. code-block:: python
from docutils.parsers.rst import directives
add_directive('literalinclude', literalinclude_directive,