diff --git a/AUTHORS.rst b/AUTHORS.rst index f57795d4fa7..5c0f9bb9882 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -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 diff --git a/CHANGES.rst b/CHANGES.rst index 9f7b8f91eba..6e30c9bc759 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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 ---------- diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index 5e1277f6cd7..dca2a03fe39 100644 --- a/sphinx/highlighting.py +++ b/sphinx/highlighting.py @@ -167,7 +167,11 @@ def get_lexer( 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)