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

Fix JSON syntax highlighting #335

Merged
merged 1 commit into from
Dec 16, 2020
Merged

Fix JSON syntax highlighting #335

merged 1 commit into from
Dec 16, 2020

Conversation

olsen232
Copy link
Collaborator

which didn't work with latest version of pygments.

Specifically, pygments.lexers.JsonLexer was changed to not be a RegexLexer and rewritten to be almost stateless. Sno code to copy state from one JSONLexer call to the next for streaming+highlit JSON output was no longer applicable.

Updated this code to work with the new JsonLexer.
Added unit tests that force syntax highlighting - Sno output in unit tests is otherwise always colour-free.

- didn't work with latest version of pygments.

Add unit tests that force syntax highlighting -
Sno output in unit tests is otherwise always colour-free.
@olsen232 olsen232 merged commit 714078d into master Dec 16, 2020
@olsen232 olsen232 deleted the fix-highlighting branch December 16, 2020 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant