diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-06-17 19:43:14 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-06-17 19:43:14 +0300 |
commit | 2119a65b860ea6619efe0881118cc3c693558ac5 (patch) | |
tree | 117e2de76962657f1c06d2f09352061c665dad4e /sphinx/highlighting.py | |
parent | 5b307fcf4f73517e79352b6b6857c35f4f1783ba (diff) |
Fix #6497: custom lexers fails highlighting when syntax error
Diffstat (limited to 'sphinx/highlighting.py')
-rw-r--r-- | sphinx/highlighting.py | 3 |
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: |