Is markdown="0" only used by kramdown?

I am currently using markdown="0" for span tags to prevent the Markdown parser from changing TeX which is supposed to be parsed by MathJax (see Ignore LaTeX-like Math mode (or parse it) for a related discussion).

I am now thinking about changing from the static site generator Jekyll to Pelican. Hence I’m thinking if this approach might be a problem.

[disclaimer: following is all untested.]

Pelican is using Python-markdown, which defaults to not parsing inside HTML, but has (buggy) support for markdown="1" with the extra extension, which Pelican enables by default.
Unfortunately, it seems to ignore the attribute value — markdown="0" makes it parse content as if it was markdown="1". So using 0 would not be portable to Pelican, you’d have to drop the attribute. I assume Python-Markdown’s author would welcome a fix.

But instead of protecting math with the <span>$A_{i,j}$</span> trick, you can teach Python-Markdown / Pelican to not parse inside math.
I’m not sure but it seems you need both Pelican plugin and extension (or similar, e.g.

1 Like

Thank you very much! I will have a look at the links as soon as other things are ready for the migration (might take a while). It’s good to have a starting point :slightly_smiling:

Also, all implementations present in Babelmark that support markdown="0" (i.e. Kramdown and Maruku) fail to parse markdown=0.

I’ve added this topic to the list of proposed extensions under “Disabling Syntax Parsing”.

1 Like