use IkiWiki 2.00;
sub import { #{{{
- hook(type => "checkconfig", id => "recentchanges",
- call => \&checkconfig);
hook(type => "needsbuild", id => "recentchanges",
call => \&needsbuild);
hook(type => "preprocess", id => "recentchanges",
call => \&htmlize);
} #}}}
-sub checkconfig () { #{{{
+sub needsbuild () { #{{{
my @changes=IkiWiki::rcs_recentchanges(100);
updatechanges("*", "recentchanges", \@changes);
} #}}}
-sub needsbuild () { #{{{
- # TODO
-} #}}}
-
sub preprocess (@) { #{{{
my %params=@_;
shift->(page => $page, destpage => $page, template => $template);
});
- writefile($page."._change", $config{srcdir}, $template->output);
+ my $html=$template->output;
+ # escape wikilinks and preprocessor stuff
+ $html=~s/(?<!\\)\[\[/\\\[\[/g;
+ writefile($page."._change", $config{srcdir}, $html);
utime $change->{when}, $change->{when}, "$config{srcdir}/$page._change";
} #}}}