]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/tag.pm
call gentag for taglinks too
[ikiwiki.git] / IkiWiki / Plugin / tag.pm
index 957b012efcde187d7255d0801ddeda50bc9502cc..9f6df5fc4b6ad1aeea840adab5a8afba4315db58 100644 (file)
@@ -45,7 +45,7 @@ sub getsetup () {
 
 sub tagpage ($) {
        my $tag=shift;
-                       
+       
        if ($tag !~ m{^\.?/} &&
            defined $config{tagbase}) {
                $tag="/".$config{tagbase}."/".$tag;
@@ -96,7 +96,6 @@ sub preprocess_tag (@) {
                # hidden WikiLink
                add_link($page, tagpage($tag), 'tag');
                
-               # add tagpage if necessary
                gentag($tag);
        }
                
@@ -112,12 +111,14 @@ sub preprocess_taglink (@) {
                if (/(.*)\|(.*)/) {
                        my $tag=linkpage($2);
                        add_link($params{page}, tagpage($tag), 'tag');
+                       gentag($tag);
                        return taglink($params{page}, $params{destpage}, $tag,
                                linktext => pagetitle($1));
                }
                else {
                        my $tag=linkpage($_);
                        add_link($params{page}, tagpage($tag), 'tag');
+                       gentag($tag);
                        return taglink($params{page}, $params{destpage}, $tag);
                }
        }