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 |
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-extensionwhich mountjupyterHighlightStylemanually.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.