markdown2.py's processing attempts to produce output exactly as
defined by http://daringfireball.net/projects/markdown/syntax -- the "Markdown
core." However, a few optional extras are also provided.
fenced-code-blocksextra instead.) Pygments-based syntax coloring of
markdown="1"in a block HTML tag to have markdown processing be done on its contents. Similar to http://michelf.com/projects/php-markdown/extra/#markdown-attr but with some limitations.
<a>tags with an href. See http://en.wikipedia.org/wiki/Nofollow.
<code>blocks. (TODO: wiki page for this)
Extras are all off by default and turned on as follows on the command line:
python markdown2.py --extras name1,name2 ...
and via the module interface:
>>> import markdown2 >>> html = markdown2.markdown_path(path, ..., extras=["name1", "name2"]) >>> html = markdown2.markdown("some markdown", ..., extras=["name1", "name2"]) >>> markdowner = Markdown(..., extras=["name1", "name2"]) >>> markdowner.convert("*boo!*") <em>boo!</em>
(New in v18.104.22.168) You can also now specify extras via the "markdown-extras" emacs-style local variable in the markdown text:
<!-- markdown-extras: code-friendly, footnotes --> This markdown text will be converted with the "code-friendly" and "footnotes" extras enabled.
This markdown text will be converted with the "code-friendly" and "footnotes" extras enabled. <!-- Local Variables: markdown-extras: code-friendly, footnotes End: -->
Last edited by Nicholas Serra,