lepture/mistune — pull request #20 by bslatkin (2014-08-28 18:32:13+00:00)
Title: Adds Renderer.default_output method for alternative output formats

The new method returns the default, empty output value for the renderer.

All renderer methods use the '+=' operator to append to this value. Default is a string so rendering HTML can build up a result string with the rendered Markdown.

Can be overridden by Renderer subclasses to be types like an empty list, allowing the renderer to create a tree-like structure to represent the document (which can then be reprocessed later into a separate format like docx or pdf).

Includes an end-to-end test. I've been using it in my own projects for about 2 weeks now.