]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/mdwn.pm
web commit by test: test 5
[git.ikiwiki.info.git] / IkiWiki / Plugin / mdwn.pm
index 8e037f5de192377018cd81c8f12a10c89d76d9bf..e5228c3299c5f98b3b8ac8b3cda0b2d11d4e6ce5 100644 (file)
@@ -7,12 +7,13 @@ use strict;
 use IkiWiki;
 
 sub import { #{{{
-       IkiWiki::hook(type => "htmlize", id => "mdwn", call => \&htmlize);
+       hook(type => "htmlize", id => "mdwn", call => \&htmlize);
 } # }}}
 
 my $markdown_loaded=0;
-sub htmlize ($) { #{{{
-       my $content = shift;
+sub htmlize (@) { #{{{
+       my %params=@_;
+       my $content = $params{content};
 
        if (! $markdown_loaded) {
                # Note: This hack to make markdown run as a proper perl
@@ -25,7 +26,7 @@ sub htmlize ($) { #{{{
                eval q{use Markdown};
                if ($@) {
                        do "/usr/bin/markdown" ||
-                               IkiWiki::error("failed to load Markdown.pm perl module ($@) or /usr/bin/markdown ($!)");
+                               error("failed to load Markdown.pm perl module ($@) or /usr/bin/markdown ($!)");
                }
                $markdown_loaded=1;
                require Encode;