The state of Markdown

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.


  1. 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. ↩︎


Comments

Olivier

Isn’t December 2004 two years ago?

Tom

Excellent work - I love Markdown Extra and use it wherever I can and the updates will be extremely helpful to me. Very many thanks for your time and effort.

Michel Fortin

Olivier: there was indeed a mistake in the text. Fixed. Thanks.

John

Great work Michel, I think it makes a lot of sense to go the object-oriented route for a library like PHP Markdown. I use Markdown in a content management system which I am currently developing, and at present I am using a facade class to interface to Markdown to implement some custom functionality I need (mainly caching of Markdown-generated HTML). Now all I need to do is great a sub-class of Markdown! Thanks for all of your hard work.

Chris Hoeppner

Hey!

I’m using the Symphony campfire service to format my second weblog’s entries, and also using your library to provide easy writing to my Pixlog project (basically an experiment on coding my own weblog from scratch using a PHP framework). I must say I love it, and use and ecourage it whenever and wherever I can.

Thanks a lot for all of your hard work!


  • © 2003–2024 Michel Fortin.