]> 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 53ea5bf18aa3f28cc162721214104a31b2133f0e..a11e5a52bbb916dcef8a30396c6fedb5f8b74d88 100644 (file)
@@ -4,9 +4,11 @@ package IkiWiki::Plugin::inline;
 
 use warnings;
 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
@@ -98,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 "";