Markdown Integration

[Edit]
25 Sep 2004 at 19:11 in development

Even though Blooki currently provides Textile, Tiki and ConvertBreaks filters, I've been thinking about adding Markdown as several people asked me about it. Markdown is a perl module, so I didn't expect any troubles integrating it with Blooki. There were few challenges though both related to the fact that Markdown is not distributed as a Perl module; instead it's distributed as a Perl script.

First, since it can run as a script and as a plugin for MovableType and Blosxom it checks if either of those is avaiable and if not, it waits for input to be processed. This is easily fixable by changing defined($blosxom::version) (line 184 in Markdown 1.0) to something like (caller(0))[7], which returns true if the script was called using use/require/do.

Second, the old IfModule directive in a config file only processesed "real" modules/packages, and not files. So I extended it to accept files and Perl versions (as Markdown requires Perl 5.6 and later). Now the fragment that loads Markdown looks like the following:

  <IfModule 5.006 Markdown.pl> # Markdown requires Perl 5.006
    AddModule Markdown
  </IfModule>

This goes into Blooki 0.48.

Calendar

September 2004 | Oct >>
SunMonTueWedThuFriSat
   1234
567891011
12131415161718
19202122232425
2627282930

Recent Entries

Syndication