Markdown, the text format created by John Gruber, has become very popular on the Internet since its first public appearance in March 2004. The PHP version I ported from John’s original Markdown implementation in Perl has become very popular too, probably more than the original mostly due to PHP being more widely used than Perl on the web today. But for some reasons, Markdown has evolved very slowly in the past two years. Anyway, that’s not a reason for me for not providing updates.
The last public release of Markdown in Perl dates from December 2004, two year ago. John has been working on a new version during this year, sporadically I’d say, and released a couple of betas for 1.0.2 semi-privately to subscribers of the discussion list. But at this rate, it’ll be a long time before improvements and bug fixes come to the publicly-available version.
So last Friday, I updated PHP Markdown to version 1.0.1d. PHP Markdown still mirrors the feature set of the Perl version 1.0.1, but I decided that from now on I’ll go further than simply port what is in the Perl version. With this latest release, I decided to go forward by installing a better HTML block parser (for those of you who insert HTML directly in your Markdown documents) and with a couple of other things. This release also fix a lot of bugs that were discovered in 2005 and were corrected in the 1.0.2 betas and for which there is no reason to delay (kudos to John for many of these fixes).
But one of the biggest changes to PHP Markdown 1.0.1d is that the code is now completely object-oriented and comes with an extension mechanism to help build customized versions of PHP Markdown with few code duplication, if any, so that they’re easy to keep up to date with the base parser. And thus, PHP Markdown Extra has just become easier to update for me because it is now implemented this way, as an extension to PHP Markdown.1
PHP Markdown Extra 1.1 is based on Markdown 1.0.1d and thus benefits from all the changes in that version. In addition, it includes a features that was much discussed on the list in 2004, namely footnotes, and another that wasn’t discussed so much but for which I received a couple of requests: abbreviations. It’s described in more details on the PHP Markdown Extra page.
I don’t know when John will release 1.0.2, but I certainly hope he does soon. I do not blame John for taking his time; I don’t know his schedule and can only assume that he is a busy man with many other things to do. But it’d certainly be interesting if the core Markdown language could improve and evolve a bit faster. Two years is a long time for wildly-used software with many known bugs still to fix.
I plan to document the extension mechanism of PHP Markdown in 2007. But you can play with it right now if you want: it’s not that difficult to figure out, especially with PHP Markdown Extra as an example. ↩