aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-05-26 08:24:36 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-05-26 08:24:36 +0000
commit282893be819eab14f3a2078f1741ec9c9ed363b1 (patch)
treecd9977f7ff30063dafd2dcb043f6507e6dd17790 /IkiWiki
parent03c98d3c79370157d94deef588415e778ab6ca87 (diff)
downloadikiwiki-282893be819eab14f3a2078f1741ec9c9ed363b1.tar
ikiwiki-282893be819eab14f3a2078f1741ec9c9ed363b1.tar.gz
* Rebuilding on upgrade to this version is recommended.
* Add a html validity check to the test suite, using the wdg-html-validator, if available. * Make the html valid when there is nothing in the actions list by adding an empty <li> to the end of it. * Reordered some function call parameters for consistency.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/CGI.pm2
-rw-r--r--IkiWiki/Plugin/inline.pm2
-rw-r--r--IkiWiki/Render.pm12
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);
}