A rewrite of the PHP Markdown code