mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Relax Pygments parsing on lexing failures
This commit is contained in:
@@ -97,8 +97,8 @@ def test_default_highlight(logger):
|
||||
|
||||
# python: raises error if highlighting failed
|
||||
ret = bridge.highlight_block('reST ``like`` text', 'python')
|
||||
logger.warning.assert_called_with('Could not lex literal_block %r as "%s". '
|
||||
'Highlighting skipped.',
|
||||
'reST ``like`` text', 'python',
|
||||
logger.warning.assert_called_with('Lexing literal_block %r as "%s" resulted in an error at token: %r. '
|
||||
'Retrying in relaxed mode.',
|
||||
'reST ``like`` text', 'python', '`',
|
||||
type='misc', subtype='highlighting_failure',
|
||||
location=None)
|
||||
|
||||
Reference in New Issue
Block a user