szymonmaszke / vimpyter

Edit your Jupyter notebooks in Vim/Neovim
MIT License
333 stars 17 forks source link

Fenced code blocks inside markdown #6

Closed phcerdan closed 6 years ago

phcerdan commented 6 years ago

Maybe is a limitation with notedown, but how can I create a markdown fenced code block. Example:

Hello this is markdown with a code block:
_```bash
 export HELLO=hola
_```

But the code block disappears when converted back to the notebook format.

szymonmaszke commented 6 years ago

After typing the snippet you provided I receive output in jupyterlab like this: 2018-03-01-165750_1507x121_scrot

Afterwards I save the vim file and exit, after coming back all I see is this (indentation used for preview only):

    Hello this is markdown with a code block:

    ```{.python .input}
    %%bash
    export HELLO=HOLA


So I run the jupyterlab again and get exactly the same output as in the screenshot above.

So my question is: Where does it disappear? It is indeed changed to python code cell, but that's notedown related as far as I can tell.
Never used bash in notebooks, is the jupyter lab output incorrect? Should it look different?

And do you use Vim8 or Neovim (it shouldn't matter but please do provide me with this information). 
phcerdan commented 6 years ago

I get exactly the same as you. It happens with every code block in markdown, not only bash, I think notedown regex cannot differentiate between a markdown code block or a code cell. Maybe better to report it there?

I use neovim 0.2.2

szymonmaszke commented 6 years ago

Oh, okay, I got it now. Tested again using just notedown and it's related to their software, you should post an issue over there.

Closing for now as it's not directly related to vimpyter.