Add highlight_options configuration value

This changeset adds the `highlight_options` configuration value, which
specifies a dict of key-value pairs to pass to the Pygments highlighter
specified with `highlight_language`. For example, specifying
`highlight_options = {'funcnamehighlighting' : False}` for the 'php'
lexer will disable function name highlighting.
Both the HTML and LaTeX writers have been updated to include the
options when calling `highlight_block()`, as long as the currently
selected language matches what was set with `highlight_language`, i.e.
not when modified by `highlight::` or `code-block::` directives.
This commit is contained in:
EricFromCanada committed 2015-01-05 12:58:43 -05:00
1 parent 649e2cd41b
commit a63e4945ea
7 files changed
+36 -7

No files matched your search

+9 -1
View File
@@ -303,9 +303,17 @@ Project information
.. versionadded:: 0.5
.. confval:: highlight_options
A dictionary of options that modify the behavior of the lexer for the
selected language. These are lexer-specific. For the options understood by
each, see the `Pygments documentation <http://pygments.org/docs/lexers/>`_.
.. versionadded:: 1.3
.. confval:: pygments_style
The style name to use for Pygments highlighting of source code. The default
The style name to use for Pygments highlighting of source code. The given
style is selected by the theme for HTML output, and ``'sphinx'`` otherwise.
.. versionchanged:: 0.3