Commits

Georg Brandl committed e2c7849

Mark code blocks as Python.

  • Participants
  • Parent commits 3dd6812

Comments (0)

Files changed (1)

doc/ext/appapi.rst

    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'))
      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,