Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lexers.specials.OutputLexer. #1836

merged 2 commits into from
Jun 7, 2021


Copy link

This pull request adds lexers.specials.OutputLexer, a lexer that highlights everything as Token.Generic.Output as discussed in issue #1835.

Copy link

@birkenfeld birkenfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Copy link
Contributor Author

We have this test failure:

               for mimetype in mimetypes:
  >               assert cls == lexers.get_lexer_for_mimetype(mimetype).__class__.__name__
  E               AssertionError: assert 'TextLexer' == 'OutputLexer'
  E                 - OutputLexer
  E                 + TextLexer

Removing the filename and MIME type configuration from from OutputLexer and fixes that.

I've updated the pull request.

@birkenfeld birkenfeld added the changelog-update Items which need to get mentioned in the changelog label Jun 7, 2021
Copy link

Perfect, thanks!

@birkenfeld birkenfeld merged commit faf69c0 into pygments:master Jun 7, 2021
@Anteru Anteru added this to the 2.10 milestone Jun 7, 2021
@doerwalter doerwalter deleted the outputlexer branch June 7, 2021 18:51
@Anteru Anteru added A-lexing area: changes to individual lexers and removed changelog-update Items which need to get mentioned in the changelog labels Aug 8, 2021
Copy link

Anteru commented Aug 8, 2021

Merged for the next release, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
A-lexing area: changes to individual lexers
None yet

Successfully merging this pull request may close these issues.

Add trivial lexer for output (using Token.Generic.Output for the complete code block)
3 participants