This is a Python implementation of John Gruber's Markdown. It is almost completely compliant with the reference implementation, though there are a few very minor differences. See John's Syntax Documentation for the syntax rules.
See the installation instructions to get started.
In addition to the basic markdown syntax, Python-Markdown supports the following features:
International Input
Python-Markdown will accept input in any language supported by Unicode including bi-directional text. In fact the test suite includes documents written in Russian and Arabic.
Middle-Word Emphasis
Python-Markdown defaults to ignoring middle-word emphasis. In other words,
some_long_filename.txt
will not become some<em>long</em>filename.txt
.
This can be switched off if desired. See the
Library Reference for details.
Extensions
Various extensions are provided (including extra) to expand the base syntax. Additionally, a public Extension API is available to write your own extensions.
Output Formats
Python-Markdown can output documents in HTML4, XHTML and HTML5. See the Library Reference for details.
"Safe Mode"
When using Python-Markdown to parse input from untrusted users on the web, the handling of raw HTML can be controlled in various ways to prevent harmful code from being injected into your site. See the Library Reference for details.
Command Line Interface
In addition to being a Python Library, a command line script is available for your convenience.
You may ask for help and discuss various other issues on the mailing list and report bugs on the bug tracker.