triple backticks in a cell
See original GitHub issueI remember once trying out Jupytext and the very first thing I tried was converting a notebook to markdown that contains a cell with three backticks in it, since I wanted to see how Jupytext solves this problem:
a = """
```
foo
```
"""
It turns out Jupytext doesn’t solve this problem, and just produces a markdown file that looks like this
I think this is a bug.
I was reminded of this, because I just learned how to properly include three backticks in a fenced markdown code block. It’s very clever. The fence is allowed to be any number $\geq 3$ of backticks in a row, so if you just happened to want to include say 4 backticks in a row inside a fenced code block, you instead use five backticks in a row for the fence like I’m doing right here in Github:
four backticks here: ````
I’m impressed with markdown. 🤷
In any case, perhaps it would be good to implement this in jupytext. Anything that correctly parses markdown will then work properly, and some unusually notebooks won’t mysteriously break.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
Hi @williamstein , the issue should be dealt with the merged PR. Do you want to give a try to the development version?
or
if you want the extension for JupyterLab (requires
nodejs
).By the way, please let us know if there is any other pattern that you would like to see supported!
Sure. Thanks for the suggestions, I’ll give them a try.