I'm using python and using markdown. Is there a simple way to add a custom syntax? I want something like [ABC]
expands to a certain tag or something.
or do I use regex?
I'm using python and using markdown. Is there a simple way to add a custom syntax? I want something like [ABC]
expands to a certain tag or something.
or do I use regex?
It appears that you can write extensions for Python-Markdown, which is probably the best approach.
If you are using some other Markdown implementation (or, you know, just for the heck of it) you could pre-process the text to implement your own tags (converting them to HTML) before handing it off to Markdown. This could be done using a regex or by any method you like. Within reasonable limits, Markdown should leave your HTML alone.