TODO catch this sphinx error in a reasonable way

This commit is contained in:
Matthias Urlichs committed 2019-02-03 16:39:31 +01:00
1 parent 67c5a5e168
commit 717aafee08
1 file changed
+3 -3
+3 -3
View File
@@ -160,10 +160,10 @@ class PygmentsBridgeExt(object):
# for py3, recognize interactive sessions, but do not try parsing...
lexer = sphinx.highlighting.lexers['pycon3']
elif lang == 'guess':
try:
# try:
lexer = sphinx.highlighting.guess_lexer(source)
except Exception:
lexer = sphinx.highlighting.lexers['none']
# except Exception:
# lexer = sphinx.highlighting.lexers['none']
else:
if lang in sphinx.highlighting.lexers:
lexer = sphinx.highlighting.lexers[lang]