X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/cade16fbb6df5b1374f28a393ef9bf2b715c143b..993b20f990b92da974f5d2467e976be4f532b36c:/IkiWiki/Plugin/mdwn.pm diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index 8e037f5de..e5228c329 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -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;