Skip to content

Notebook doesn't respect syntax highlighting theme

Summary

Jupyter notebook displays do not use the syntax highlighting theme in Preferences to display code blocks. The display is the same no matter what the syntax highlighting selection.

Steps to reproduce

  • Create (or view) Jupyter notebooks with Python code cells in a repo.
  • Open notebook view in a separate tab
  • Adjust "Navigation theme* to see that the rest of the notebook changes after refresh
  • Adjust "Syntax highlighting theme" to see that the notebook code cells do not change on refresh

Example Project

Not sure if this is OK, but my public project+notebook (https://gitlab.com/mmoran0032/sequence-embeddings/-/blob/main/notebooks/20220117-mind-modeling.ipynb) can be referenced. I've used it in the screenshots below.

What is the current bug behavior?

Code cells in Jupyter notebook do not change when selecting different syntax highlighting preferences.

Example of wrong code cell highlighting below. Generated with "Navigation = Dark mode (alpha)" and "Syntax = Dark". Similar outputs happen with different navigation themes. No change is observed whan changing the syntax theme. image

What is the expected correct behavior?

Code cells in Jupyter notebook do change when changing the syntax highlight preference.

Example preferences used for the above view: image

Relevant logs and/or screenshots

n/a

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

🤷

Results of GitLab application Check

🤷

Possible fixes

🤷