Open dakoop opened 2 years ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
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
a = [1,2,3,4]; print(a[1:3])
and save it asdemo.ipynb
nbconvert --to html --template lab demo.ipynb
Expected behavior
These elements would be the default text color.
Context
Suggested fix
Comment out the line setting the punctuation color here: https://github.com/jupyterlab/jupyterlab_pygments/blob/7070bc1e858bb531cabb296278a74738cdc1639d/jupyterlab_pygments/style.py#L132