You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that some language tags for fenced code blocks are differentially highlighted in jupyterlab compared to the html output from nbconvert. Would it be possible to use the same stylesheet between jupyterlab and nbconvert to make this consistent (not sure which one is more correct, if any)?
For all the example diff output below, jupyterlab is on the left and nbconvert HTML on the right
For context, @SylvainCorlay wrote this reply in the original thread:
Actually, nbconvert's lab template and jupyterlab really use the same CSS, but ... not the same HTML.
in the case of JupyterLab, code cells are rendered in the frontend with the CodeMirror JS library, and (most typically) with a custom JupyterLab theme which uses the CSS variables from JupyterLab.
in the case of nbconvert, the code cells are rendered using the Pygments Python library which produces static HTML with syntax highlighting, and a special theme which mimicks the default CodeMirror theme of JupyterLab: https://github.com/jupyterlab/jupyterlab_pygments.
Unfortunately, Pygments-generated HTML and CSS classes are not granular enough to reproduce all of the features of the codemirror highlighting, It is unlikely to produce exactly the same thing.
No worries, is it worth keeping this open if there is an easy future option to have the highlighting match up? Or is it more of a situation where a change will likely not be worthwhile?
Originally reported in jupyter/nbconvert#1385
I noticed that some language tags for fenced code blocks are differentially highlighted in jupyterlab compared to the html output from nbconvert. Would it be possible to use the same stylesheet between jupyterlab and nbconvert to make this consistent (not sure which one is more correct, if any)?
For all the example diff output below, jupyterlab is on the left and nbconvert HTML on the right
diff
is not highlighted at allsh
differs in the highlighting of the command, flags, parentheses, + and -The text was updated successfully, but these errors were encountered: