diff options
author | Georg Brandl <georg@python.org> | 2011-09-22 09:14:50 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-09-22 09:14:50 +0200 |
commit | 5373125fc6a06228cc690bc603e99b3ebd89442d (patch) | |
tree | 218f23fa3fe9b8ddbc853e706a3a0a963cb48f07 /doc/markup/code.rst | |
parent | 3d93b326f7c6eccd70ed350c0a0f9d5056fb342a (diff) | |
parent | 2c0f936e6ba6cf4996175106a289b04f0856cd9a (diff) | |
download | sphinx-git-5373125fc6a06228cc690bc603e99b3ebd89442d.tar.gz |
Merged in marklodato/sphinx (pull request #4)
Diffstat (limited to 'doc/markup/code.rst')
-rw-r--r-- | doc/markup/code.rst | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/doc/markup/code.rst b/doc/markup/code.rst index eaaf17d08..8f6d55247 100644 --- a/doc/markup/code.rst +++ b/doc/markup/code.rst @@ -86,6 +86,18 @@ on line numbers for the individual block:: Some more Ruby code. +Additionally, an ``emphasize-lines`` option can be given to have Pygments +emphasize particular lines:: + + .. code-block:: python + :emphasize-lines: 3,5 + + def some_function(): + interesting = False + print 'This line is highlighted.' + print 'This one is not...' + print '...but this one is.' + Includes ^^^^^^^^ @@ -107,11 +119,13 @@ Includes desired tab width. The directive also supports the ``linenos`` flag option to switch on line - numbers, and a ``language`` option to select a language different from the - current file's standard language. Example with options:: + numbers, the ``emphasize-lines`` option to emphasize particular lines, and + a ``language`` option to select a language different from the current + file's standard language. Example with options:: .. literalinclude:: example.rb :language: ruby + :emphasize-lines: 12,15-18 :linenos: Include files are assumed to be encoded in the :confval:`source_encoding`. |