Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-06-17 19:43:14 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-06-17 19:43:14 +0300
commit2119a65b860ea6619efe0881118cc3c693558ac5 (patch)
tree117e2de76962657f1c06d2f09352061c665dad4e /sphinx/highlighting.py
parent5b307fcf4f73517e79352b6b6857c35f4f1783ba (diff)
Fix #6497: custom lexers fails highlighting when syntax error
Diffstat (limited to 'sphinx/highlighting.py')
-rw-r--r--sphinx/highlighting.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py
index 2d825e9f1..b4e63209f 100644
--- a/sphinx/highlighting.py
+++ b/sphinx/highlighting.py
@@ -139,7 +139,8 @@ class PygmentsBridge:
lexer = lexers['none']
if lang in lexers:
- lexer = lexers[lang]
+ # just return custom lexers here (without installing raiseonerror filter)
+ return lexers[lang]
elif lang in lexer_classes:
lexer = lexer_classes[lang](**opts)
else: