markdown-to-jsx
markdown-to-jsx copied to clipboard
Falsy rendering code block in a code block
Description
When rendering a code block with language, it will ignore (```) that has no character between
them.
Ex:
Markdown:
Display:
We can see that (```)markdown
will catch nearest (```)
but ignore (```)python
since nothing is in between them.
Now for code block which has language but does has character in between
them:
Markdown:
Display:
If it has only a character between (```)
s , it will still group everything although the second (```)
is mean for other code block
Ideas
Like other markdown renderer (e.g. the one used by Github and VSCode), a code block should only catch standalone (```)
, instead of the next (```)
even if they suppose to be used by other block.
The second set of ``` terminates the prior, you need to escape the inside ones. Thinking about if there's a good way to handle this. When there is a language specified it makes it easier since you know for sure that it's basically a new "opening" but without a language it's ambiguous.