-
-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
In JupyterLab, CodeMirror does not tag items like brackets, colons, semi-colons, parentheses, and commas as punctuation. pygments flags such elements as punctuation and jupyterlab_pygments styles them as --jp-mirror-editor-punctuation-color, leading to a mismatch in color for these elements. Don't think this is a big deal, and one could argue that pygments is doing a better job, but it does seem to be inconsistent.
Reproduce
- Create a JupyterLab notebook with the cell
a = [1,2,3,4]; print(a[1:3])and save it asdemo.ipynb - Run
nbconvert --to html --template lab demo.ipynb - Inspect the differences in the output html file and the original notebook rendered in JupyterLab. The colors for brackets, colons, semi-colons, parentheses, and commas are blue in the html file and the default text color in JupyterLab.
Expected behavior
These elements would be the default text color.
Context
- Operating System and version: macOS 12.4
- Browser and version: Safari 15.5
- JupyterLab version: 3.4.2
Suggested fix
Comment out the line setting the punctuation color here:
| Punctuation: 'var(--jp-mirror-editor-punctuation-color)' # class: 'p' |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working