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
merged 2 commits into from
Jun 7, 2021
Merged

Conversation

doerwalter
Copy link
Contributor

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

Copy link
Member

@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.

LGTM.

@doerwalter
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 _mapping.py 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
@birkenfeld
Copy link
Member

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
@Anteru
Copy link
Collaborator

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
Labels
A-lexing area: changes to individual lexers
Projects
None yet
Development

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