]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/inline.pm
* --getctime had bitrotted (well I only ever used it the once so far..),
[ikiwiki.git] / IkiWiki / Plugin / inline.pm
index c554774f6c23f1257d63a46bad8376d2e7eee82b..a11e5a52bbb916dcef8a30396c6fedb5f8b74d88 100644 (file)
@@ -7,7 +7,8 @@ use strict;
 use IkiWiki;
 
 sub import { #{{{
-       IkiWiki::register_plugin("preprocess", "inline", \&IkiWiki::preprocess_inline);
+       IkiWiki::hook(type => "preprocess", id => "inline", 
+               call => \&IkiWiki::preprocess_inline);
 } # }}}
 
 # Back to ikiwiki namespace for the rest, this code is very much
@@ -99,7 +100,7 @@ sub get_inline_content ($$) { #{{{
        my $file=$pagesources{$page};
        my $type=pagetype($file);
        if ($type ne 'unknown') {
-               return htmlize($type, linkify(readfile(srcfile($file)), $parentpage));
+               return htmlize($type, linkify($parentpage, readfile(srcfile($file))));
        }
        else {
                return "";