summaryrefslogtreecommitdiff
path: root/sphinx/highlighting.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2015-01-06 17:09:29 +0100
committerGeorg Brandl <georg@python.org>2015-01-06 17:09:29 +0100
commit81313e903be479d0b49d154d25a3ce47eca73367 (patch)
tree9399f2b6c89310e4c501e85657e4737c1e4fe519 /sphinx/highlighting.py
parenta9c1ab9828d55324bc57c595b5b9b0617ad036d9 (diff)
parent0f0ffbb9827f55807ddbd6bdd9c3096bb539fc55 (diff)
downloadsphinx-git-81313e903be479d0b49d154d25a3ce47eca73367.tar.gz
Merge pull request #1666 from EricFromCanada/highlight_options
Add highlight_options configuration value
Diffstat (limited to 'sphinx/highlighting.py')
-rw-r--r--sphinx/highlighting.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py
index b6062e83e..63a46fbd7 100644
--- a/sphinx/highlighting.py
+++ b/sphinx/highlighting.py
@@ -134,7 +134,7 @@ class PygmentsBridge(object):
else:
return True
- def highlight_block(self, source, lang, warn=None, force=False, **kwargs):
+ def highlight_block(self, source, lang, opts=None, warn=None, force=False, **kwargs):
if not isinstance(source, text_type):
source = source.decode()
@@ -164,7 +164,7 @@ class PygmentsBridge(object):
lexer = lexers[lang]
else:
try:
- lexer = lexers[lang] = get_lexer_by_name(lang)
+ lexer = lexers[lang] = get_lexer_by_name(lang, **opts)
except ClassNotFound:
if warn:
warn('Pygments lexer name %r is not known' % lang)