mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #6497: custom lexers fails highlighting when syntax error
This commit is contained in:
parent
5b307fcf4f
commit
2119a65b86
2
CHANGES
2
CHANGES
@ -16,6 +16,8 @@ Features added
|
|||||||
Bugs fixed
|
Bugs fixed
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
* #6497: custom lexers fails highlighting when syntax error
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -139,7 +139,8 @@ class PygmentsBridge:
|
|||||||
lexer = lexers['none']
|
lexer = lexers['none']
|
||||||
|
|
||||||
if lang in lexers:
|
if lang in lexers:
|
||||||
lexer = lexers[lang]
|
# just return custom lexers here (without installing raiseonerror filter)
|
||||||
|
return lexers[lang]
|
||||||
elif lang in lexer_classes:
|
elif lang in lexer_classes:
|
||||||
lexer = lexer_classes[lang](**opts)
|
lexer = lexer_classes[lang](**opts)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user