2 # Markdown markup language
3 package IkiWiki::Plugin::mdwn;
10 IkiWiki::hook(type => "htmlize", id => "mdwn", call => \&htmlize);
13 sub htmlize ($) { #{{{
16 if (! $INC{"/usr/bin/markdown"}) {
17 # Note: a proper perl module is available in Debian
18 # for markdown, but not upstream yet.
20 $blosxom::version="is a proper perl module too much to ask?";
22 do "/usr/bin/markdown";
26 # Workaround for perl bug (#376329)
27 $content=Encode::encode_utf8($content);
28 $content=Encode::encode_utf8($content);
29 $content=Markdown::Markdown($content);
30 $content=Encode::decode_utf8($content);
31 $content=Encode::decode_utf8($content);