For example, Stack Overflow allows only a very small subset of Markdown syntax in comment editor.
I’d like to know if there is any open source Markdown library that supports syntax restriction? I’m currently using Python but I can’t even find one in any language.
I’ve never used any Python Markdown parsers, but I have used a Java Markdown library called Pegdown that allows you to enable or disable various syntax extentions.
For example, this snippet enables Markdown Extra table syntax and disables both inline HTML and HTML blocks in the markdown input:
Here is a list of all available PegDown extensions.