mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #6502 from tk0miya/6497_custom_lexers_fails_highlighting
Fix #6497: custom lexers fails highlighting when syntax error
This commit is contained in:
commit
be0856190f
2
CHANGES
2
CHANGES
@ -16,6 +16,8 @@ Features added
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
* #6497: custom lexers fails highlighting when syntax error
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user