summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2007-03-29 10:30:21 +0200
committergbrandl <devnull@localhost>2007-03-29 10:30:21 +0200
commitd30fd9d4ee2fe5cf57b9fbbe62cf021d9535f41c (patch)
treef87076025751fed0cb330219499f1f3fe1bbff46
parent732839419f6a3772c40bfed74dcf05f18d95306f (diff)
downloadpygments-d30fd9d4ee2fe5cf57b9fbbe62cf021d9535f41c.tar.gz
[svn] Document "handlecodeblocks" option. Bad mitsuhiko :)
-rw-r--r--docs/src/rstdirective.txt4
-rw-r--r--pygments/lexers/text.py7
2 files changed, 11 insertions, 0 deletions
diff --git a/docs/src/rstdirective.txt b/docs/src/rstdirective.txt
index e049c87f..6e13d1f0 100644
--- a/docs/src/rstdirective.txt
+++ b/docs/src/rstdirective.txt
@@ -41,4 +41,8 @@ files using this syntax::
your code here
+*Loosely related note:* The ReST lexer now recognizes ``.. sourcecode::`` and
+``.. code::`` directives and highlights the contents in the specified language
+if the `handlecodeblocks` option is true.
+
.. _ReST: http://docutils.sf.net/rst.html
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py
index 5b10c7a8..deab203d 100644
--- a/pygments/lexers/text.py
+++ b/pygments/lexers/text.py
@@ -453,6 +453,13 @@ class RstLexer(RegexLexer):
For `reStructuredText <http://docutils.sf.net/rst.html>`_ markup.
*New in Pygments 0.7.*
+
+ Additional options accepted:
+
+ `handlecodeblocks`
+ Highlight the contents of ``.. sourcecode:: langauge`` and
+ ``.. code:: language`` directives with a lexer for the given
+ language (default: ``True``). *New in Pygments 0.8.*
"""
name = 'reStructuredText'
aliases = ['rst', 'rest', 'restructuredtext']