-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 highlighting issue when printing JSON that isn't indented #2038
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #2038 +/- ##
==========================================
+ Coverage 99.54% 99.78% +0.24%
==========================================
Files 73 71 -2
Lines 7294 7109 -185
==========================================
- Hits 7261 7094 -167
+ Misses 33 15 -18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of requests, as discussed...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Type of changes
Checklist
Description
Previously the JSONHighlighter would do two passes with Text.highlight - the second pass would highlight JSON keys.
I've got rid of the second regex for the 2nd Text.highlight pass, and replaced it with a regex which captures the spans of strings, followed by some manual processing to determine whether they're keys or not. If the string is a key, we append the json.key Span.
Previously:
Closes #2027