2 package IkiWiki::Plugin::recentchangesdiff;
9 hook(type => "pagetemplate", id => "recentchangesdiff",
10 call => \&pagetemplate);
13 sub pagetemplate (@) { #{{{
15 my $template=$params{template};
16 if ($config{rcs} && exists $params{rev} && length $params{rev} &&
17 $template->query(name => "diff")) {
18 my $diff=IkiWiki::rcs_diff($params{rev});
19 if (defined $diff && length $diff) {
20 # escape links and preprocessor stuff
21 $diff =~ s/(?<!\\)\[\[/\\\[\[/g;
22 $template->param(diff => $diff);