I've managed to resolve several of my issues with Python-Markdown behaving not quite as I expect. I have the pleasure to announce three new extensions which now power this blog.
No Lazy BlockQuote Extension
makes it possible blockquotes separated by newline to be rendered separately.
If you want to include empty lines in your blockquotes make sure to prefix
each line with
>. The standard behavior can be seen in
while the changed behavior is visible
in this article. Notice how on
GitHub both quotes are rendered as one big block, while here they are two separate
No Lazy Code Extension
Markdown-No-Lazy-Code-Extension allows code blocks separated by newline to be rendered separately. If you want to include empty lines in your code blocks make sure to indent them as well. The standard behavior can be seen on GitHub while the improved one in this post. Notice how GitHub renders the code in the Warning Bugs Present section as one block while in reality these are two separate blocks from two different files.
allows for easy references to bugs. Strings like
be converted into links.
All three extensions are available on PyPI!
Bonus: Codehilite with filenames in Markdown
The standard Markdown codehilite extension doesn't allow to specify filename
:::python shebang line while Octopress did and I've used the syntax
on this blog in a number of articles. The fix is simple, but requires changes in
both Markdown and Pygments. See
PR #445 for the initial
version and ongoing discussion. Example of the new
:::python settings.py syntax
can be seen