trentm/python-markdown2 — pull request #90 by joestump (2012-06-14 22:23:17+00:00)
Title: Added preprocess() and fixed minor bug in atx header regular expression.

Hey @trentm, we use python-markdown2 at Sprint.ly and love it. We have our own flavoring to our Markdown (auto-linking tickets, URLs, etc.) and wanted to push back two minor changes I made for our own uses.

1. I changed the atx regular expression to require one or more spaces between the # and the header text. It's not explicitly stated on DF as being required, but his examples all show a single space. This keeps comments, hash tags, and ticket numbers at the beginning of the line from turning into an h1.
2. I added a preprocess() method that runs prior to the formatting for sub-classes. It's postprocess()'s cousin.