]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/mdwn.pm
web commit by PatrickWinnertz: since revert isn't possible via web, I 'reverted'...
[ikiwiki.git] / IkiWiki / Plugin / mdwn.pm
index c871e2a4d326c7080bdb5803eb462491a6cdbf79..ca8898679216684da988bfd2fb08cd14dd04ff51 100644 (file)
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::mdwn;
 
 use warnings;
 use strict;
-use IkiWiki;
+use IkiWiki 2.00;
 
 sub import { #{{{
        hook(type => "htmlize", id => "mdwn", call => \&htmlize);
@@ -34,7 +34,7 @@ sub htmlize (@) { #{{{
                        }
                        else {
                                do "/usr/bin/markdown" ||
-                                       error("failed to load Markdown.pm perl module ($@) or /usr/bin/markdown ($!)");
+                                       error(sprintf(gettext("failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)"), $@, $!));
                                $markdown_sub=\&Markdown::Markdown;
                        }
                }
@@ -44,7 +44,7 @@ sub htmlize (@) { #{{{
        # Workaround for perl bug (#376329)
        $content=Encode::encode_utf8($content);
        $content=Encode::encode_utf8($content);
-       $content=Markdown::Markdown($content);
+       $content=&$markdown_sub($content);
        $content=Encode::decode_utf8($content);
        $content=Encode::decode_utf8($content);