Configuring JupyterLab Markdown highlighter to support MyST

Hi All,

I am starting to fully write my notebooks in MyST to be used with jupyter-book. For that, I create a markdown file, attach a Console Editor to my file, and do my thing, and it is working pretty well. However, in order to instruct jupyter-book to run a cell, the syntax used is:

```{code-cell} python3
print("Hello World");
```

Jupyterlab Markdown editor doesn’t understand that this is a python cell, and doesn’t highlight the code. However, it does if I instead of {code-cell} python3 use just python:

Screen Shot 2020-11-04 at 2.46.58 PM

Is there any way to tell the editor that {code-cell} python3 should be highlighted as python?

1 Like

I have the same issue. I want to publish my jupyter-notebooks using jupyterbook. At the same time, I want to be able to show them in jupyter lab. This works perfectly fine as long as I don’t use MyST syntax.
However, using MyST syntax, to eg. create a figure with a caption, looks good in the published jupyterbook but bad in jupyter lab:

```{figure} image.jpg
:height: 300px
:name: Tree

Caption text here...
```

This is how it looks in jupyterbook:

image

In jupyter lab it only shows this:

:height: 300px
:name: Tree

Caption text here...

Is there a way, to make jupyter lab show markdown-cells using MyST syntax correctly? (Like in jupyterbooks)?