diff options
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/camelcase.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/img.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/link.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/tag.pm | 6 |
5 files changed, 7 insertions, 7 deletions
diff --git a/IkiWiki/Plugin/camelcase.pm b/IkiWiki/Plugin/camelcase.pm index 74a8397d7..088447d6b 100644 --- a/IkiWiki/Plugin/camelcase.pm +++ b/IkiWiki/Plugin/camelcase.pm @@ -61,7 +61,7 @@ sub scan (@) { my $content=$params{content}; while ($content =~ /$link_regexp/g) { - push @{$links{$page}}, linkpage($1) unless ignored($1) + add_link($page, linkpage($1)) unless ignored($1) } } diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index d295b833b..a697fea19 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -43,7 +43,7 @@ sub preprocess (@) { return ''; } - push @{$links{$params{page}}}, $image; + add_link($params{page}, $image); # optimisation: detect scan mode, and avoid generating the image if (! defined wantarray) { return; diff --git a/IkiWiki/Plugin/link.pm b/IkiWiki/Plugin/link.pm index b79273f96..4c1add985 100644 --- a/IkiWiki/Plugin/link.pm +++ b/IkiWiki/Plugin/link.pm @@ -86,7 +86,7 @@ sub scan (@) { my $content=$params{content}; while ($content =~ /(?<!\\)$link_regexp/g) { - push @{$links{$page}}, linkpage($2); + add_link($page, linkpage($2)); } } diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 4a22fed30..cc5455d64 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -110,7 +110,7 @@ sub preprocess (@) { } elsif ($key eq 'link' && ! %params) { # hidden WikiLink - push @{$links{$page}}, $value; + add_link($page, $value); return ""; } elsif ($key eq 'author') { diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index 8fe9c6828..cdcfaf536 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -73,7 +73,7 @@ sub preprocess_tag (@) { $tag=linkpage($tag); $tags{$page}{$tag}=1; # hidden WikiLink - push @{$links{$page}}, tagpage($tag); + add_link($page, tagpage($tag)); } return ""; @@ -88,14 +88,14 @@ sub preprocess_taglink (@) { if (/(.*)\|(.*)/) { my $tag=linkpage($2); $tags{$params{page}}{$tag}=1; - push @{$links{$params{page}}}, tagpage($tag); + add_link($params{page}, tagpage($tag)); return taglink($params{page}, $params{destpage}, $tag, linktext => pagetitle($1)); } else { my $tag=linkpage($_); $tags{$params{page}}{$tag}=1; - push @{$links{$params{page}}}, tagpage($tag); + add_link($params{page}, tagpage($tag)); return taglink($params{page}, $params{destpage}, $tag); } } |