diff options
| author | Georg Brandl <georg@python.org> | 2010-01-03 19:38:17 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-01-03 19:38:17 +0100 |
| commit | b14ee0829702d6a7f2a2bca8e4c6e3f153ba5ebf (patch) | |
| tree | 33f485a4999c1aa87c753057e05238d85a127604 /doc/ext/appapi.rst | |
| parent | e7ead814127708601c5ba64453461ce5f0991bd0 (diff) | |
| download | sphinx-b14ee0829702d6a7f2a2bca8e4c6e3f153ba5ebf.tar.gz | |
Mark code blocks as Python.
Diffstat (limited to 'doc/ext/appapi.rst')
| -rw-r--r-- | doc/ext/appapi.rst | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/ext/appapi.rst b/doc/ext/appapi.rst index 6864d6ba..cdec3d52 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, |
