X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/4763514861457c295cadb7dbc7c0697ce682004f..985a34b09e8b856e700b9ecccd707cb54e9fc659:/IkiWiki/Plugin/link.pm diff --git a/IkiWiki/Plugin/link.pm b/IkiWiki/Plugin/link.pm index 24579057c..515a62bce 100644 --- a/IkiWiki/Plugin/link.pm +++ b/IkiWiki/Plugin/link.pm @@ -11,6 +11,7 @@ sub import { #{{{ hook(type => "checkconfig", id => "link", call => \&checkconfig); hook(type => "linkify", id => "link", call => \&linkify); hook(type => "scan", id => "link", call => \&scan); + hook(type => "renamepage", id => "link", call => \&renamepage); } # }}} sub checkconfig () { #{{{ @@ -80,4 +81,33 @@ sub scan (@) { #{{{ } } # }}} +sub renamepage (@) { #{{{ + my %params=@_; + my $page=$params{page}; + my $old=$params{oldpage}; + my $new=$params{newpage}; + + $params{content} =~ s{(?