mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use the `misc.highlighting_failure
warning sub-type for
PygmentsBridge.get_lexer()
` (#13335)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
This commit is contained in:
parent
29a02c64e0
commit
3b2667e591
@ -28,6 +28,7 @@ Contributors
|
||||
* Antonio Valentino -- qthelp builder, docstring inheritance
|
||||
* Antti Kaihola -- doctest extension (skipif option)
|
||||
* Barry Warsaw -- setup command improvements
|
||||
* Bart Kamphorst -- warning improvements
|
||||
* Ben Egan -- Napoleon improvements & viewcode improvements
|
||||
* Benjamin Peterson -- unittests
|
||||
* Blaise Laflamme -- pyramid theme
|
||||
|
@ -111,6 +111,8 @@ Features added
|
||||
* #13326: Remove hardcoding from handling :class:`~sphinx.addnodes.productionlist`
|
||||
nodes in all writers, to improve flexibility.
|
||||
Patch by Adam Turner.
|
||||
* #13335: Use ``misc.highlighting_failure`` subtype for Pygments unknown lexers.
|
||||
Patch by Bart Kamphorst.
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
@ -167,7 +167,11 @@ class PygmentsBridge:
|
||||
lexer = get_lexer_by_name(lang, **opts)
|
||||
except ClassNotFound:
|
||||
logger.warning(
|
||||
__('Pygments lexer name %r is not known'), lang, location=location
|
||||
__('Pygments lexer name %r is not known'),
|
||||
lang,
|
||||
location=location,
|
||||
type='misc',
|
||||
subtype='higlighting_failure',
|
||||
)
|
||||
lexer = lexer_classes['none'](**opts)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user