summaryrefslogtreecommitdiff
path: root/doc/markup
diff options
context:
space:
mode:
authorgeorg.brandl <devnull@localhost>2008-09-09 19:10:09 +0000
committergeorg.brandl <devnull@localhost>2008-09-09 19:10:09 +0000
commit7191ff519792bfa2be2f974393d6121c39c1367c (patch)
treec674a3501e99a7856aa037a952e9c2b7778886de /doc/markup
parent987eba7aa711b763ea0f5bad102042c5730ca2b5 (diff)
downloadsphinx-7191ff519792bfa2be2f974393d6121c39c1367c.tar.gz
Add default highlight language selection support.
Add support for recognizing Python 3 console output.
Diffstat (limited to 'doc/markup')
-rw-r--r--doc/markup/code.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/markup/code.rst b/doc/markup/code.rst
index ca8f39bb..f01070f6 100644
--- a/doc/markup/code.rst
+++ b/doc/markup/code.rst
@@ -1,5 +1,7 @@
.. highlight:: rest
+.. _code-examples:
+
Showing code examples
---------------------
@@ -23,7 +25,9 @@ Syntax highlighting is done with `Pygments <http://pygments.org>`_ (if it's
installed) and handled in a smart way:
* There is a "highlighting language" for each source file. Per default, this is
- ``'python'`` as the majority of files will have to highlight Python snippets.
+ ``'python'`` as the majority of files will have to highlight Python snippets,
+ but the doc-wide default can be set with the :confval:`highlight_language`
+ config value.
* Within Python highlighting mode, interactive sessions are recognized
automatically and highlighted appropriately.
@@ -48,7 +52,7 @@ installed) and handled in a smart way:
* The valid values for the highlighting language are:
* ``none`` (no highlighting)
- * ``python`` (the default)
+ * ``python`` (the default when :confval:`highlight_language` isn't set)
* ``rest``
* ``c``
* ... and any other lexer name that Pygments supports.