Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!



mark3 provides a lightweight, markdown to html parser for python 2.7 and 3.


Using mark3 is very simple:

from mark3.markdown import markdown
html = markdown(raw_text)


mark3 may differ slightly from the official markdown implementation.

If you find a difference between mark3's output and the official markdown's not mentioned here, please open a ticket.


A <p> will be placed in an <li> if, and only if it's needed:

* foo
* bar

Will produce the same output as:

* foo

* bar

Inline HTML

This markdown:

< foo <b>bar</b>>


<p>&lt; foo <b>bar</b>&gt;</p>

Instead of the official markdown implementation output:

<p>&lt; foo <b>bar</b>></p>


Tabs are expanded to 4 spaces before parsing. As such, output will never contain tabs.

Insignificant Whitespace

Outputted html doesn't have as much insignificant whitespace as the official markdown implementation.

Recent activity

Joseph Marshall

Commits by Joseph Marshall were pushed to jlm/mark3

2e70d87 - * Fixed bug that caused a dashed line to try and create a header from a list item. * multi-line list items are recognized by ...
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.