X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/914c839ceb02fdbb36a49aa6548dc95beaf59ea4..acb79b5c00b48c4b52a29703e9d7b52330fd23b2:/IkiWiki/Plugin/tag.pm diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index d43910910..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); } } @@ -125,4 +125,12 @@ sub pagetemplate (@) { } } +package IkiWiki::PageSpec; + +sub match_tagged ($$;@) { + my $page = shift; + my $glob = shift; + return match_link($page, IkiWiki::Plugin::tag::tagpage($glob)); +} + 1