use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
my $link_regexp;
hook(type => "checkconfig", id => "link", call => \&checkconfig);
hook(type => "linkify", id => "link", call => \&linkify);
hook(type => "scan", id => "link", call => \&scan);
- hook(type => "renamelink", id => "link", call => \&renamelink);
+ hook(type => "renamepage", id => "link", call => \&renamepage);
}
sub getsetup () {
plugin => {
safe => 1,
rebuild => 1,
+ section => "core",
},
}
my $content=$params{content};
while ($content =~ /(?<!\\)$link_regexp/g) {
- push @{$links{$page}}, linkpage($2);
+ add_link($page, linkpage($2));
}
}
-sub renamelink (@) {
+sub renamepage (@) {
my %params=@_;
my $page=$params{page};
my $old=$params{oldpage};