-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 syntax highlighting for JSON viewer in Jupyter Notebook #13470
Fix syntax highlighting for JSON viewer in Jupyter Notebook #13470
Conversation
Thanks for making a pull request to jupyterlab! |
Thanks @kostyafarber for working on this and tracking the issue down 👍 |
Is all this stylesheet does adding the green bold colour for keys and a few more colours for numbers/strings/null? Maybe we could just have a dedicated style in this extension rather than bringing another dependency and another copy of the stylesheet? |
FYI: I think it was done to get an identical styles for JSON in CodeMirror editor and in the viewer - that said I don't have cons to move to a new stylesheet.
FYI: this is a new direct dependency. But it is not a new dependency as that package was created for and is needed by CodeMirror 6 (by the same author). Moreover it is carefully designed to not add stylesheet that are not necessary. And as in this case the theme is identical to the default Jupyter CodeMirror theme, it will not add a new stylesheet in JupyterLab page. |
|
No worries! It was really @fcollonval that found the issue haha |
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.
Thanks @kostyafarber
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.
Thanks!
The examples
CI failure is tracked in #13481
References
This PR addresses jupyter/notebook#6567 in Jupyter Notebook, by making an upstream change here in JupyterLab.
Code changes
The changes are to the
json-extension
which mountjupyterHighlightStyle
manually.User-facing changes
The users of Jupyter Notebook will see the same as what they see in JupyterLab when opening a JSON file.
Before
After
Backwards-incompatible changes
No anticipated backwards incompatible changes.