Closed abudden closed 2 years ago
I think this is just because the given file is a Markdown but not a Pandoc Markdown file. Indeed as seen in the Pandoc Markdown docs:
Original Markdown syntax does not require a blank line before a heading. Pandoc does require this (except, of course, at the beginning of the document)
Like regular code blocks, fenced code blocks must be separated from surrounding text by blank lines.
So I think your file is a valid markdown, but not a valid Pandoc Markdown, which is why it is not correctly highlighted.
The
:::
marks are used as divs in pandoc. If there is a line immediately after:::
, it isn't highlighted properly. For example, in this file (generated by jupytext):https://raw.githubusercontent.com/mwouts/jupytext/main/demo/World%20population.pandoc.md
Lines such as L20:
# A quick insight at world population
and L30:``` {.python}
are incorrectly highlighted. The highlighting can be "fixed" by adding a blank line, but this should not be required.