diff options
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/CGI.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Render.pm | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 15e86651d..2483bf4d8 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -351,7 +351,7 @@ sub cgi_editpage ($$) { #{{{ require IkiWiki::Render; $form->tmpl_param("page_preview", htmlize($config{default_pageext}, - linkify($form->field('content'), $page))); + linkify($page, $form->field('content')))); } else { $form->tmpl_param("page_preview", ""); diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 61b4a8523..a11e5a52b 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -100,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 ""; diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index b59a721c0..5bc7f6ebb 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -8,8 +8,8 @@ use File::Spec; use IkiWiki; sub linkify ($$) { #{{{ - my $content=shift; my $page=shift; + my $content=shift; $content =~ s{(\\?)$config{wiki_link_regexp}}{ $2 ? ( $1 ? "[[$2|$3]]" : htmllink($page, titlepage($3), 0, 0, pagetitle($2))) @@ -152,8 +152,8 @@ sub globlist_merge ($$) { #{{{ } #}}} sub genpage ($$$) { #{{{ - my $content=shift; my $page=shift; + my $content=shift; my $mtime=shift; my $title=pagetitle(basename($page)); @@ -218,8 +218,8 @@ sub mtime ($) { #{{{ } #}}} sub findlinks ($$) { #{{{ - my $content=shift; my $page=shift; + my $content=shift; my @links; while ($content =~ /(?<!\\)$config{wiki_link_regexp}/g) { @@ -254,15 +254,15 @@ sub render ($) { #{{{ } } - $links{$page}=[findlinks($content, $page)]; + $links{$page}=[findlinks($page, $content)]; - $content=linkify($content, $page); + $content=linkify($page, $content); $content=preprocess($page, $content); $content=htmlize($type, $content); check_overwrite("$config{destdir}/".htmlpage($page), $page); writefile(htmlpage($page), $config{destdir}, - genpage($content, $page, mtime($srcfile))); + genpage($page, $content, mtime($srcfile))); $oldpagemtime{$page}=time; $renderedfiles{$page}=htmlpage($page); } |