Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ Features added
Patch by Jakob Lykke Andersen and Adam Turner.
* #11280: Add ability to skip a particular section using the ``no-search`` class.
Patch by Will Lachance.
* #13335: Use ``misc.highlighting_failure`` subtype for Pygments unknown lexers.
Patch by Bart Kamphorst.

Bugs fixed
----------
Expand Down
6 changes: 5 additions & 1 deletion sphinx/highlighting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down