]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/tag.pm
really add
[git.ikiwiki.info.git] / IkiWiki / Plugin / tag.pm
index 276d67e03d4983c32242c6ee682637e0b5897b27..b0a0e53be7cec3c73147ce61fe353aaa9b8a3d69 100644 (file)
@@ -25,7 +25,8 @@ sub getopt () { #{{{
 sub tagpage ($) { #{{{
        my $tag=shift;
                        
 sub tagpage ($) { #{{{
        my $tag=shift;
                        
-       if (exists $config{tagbase} &&
+       if ($tag !~ m{^\.?/} &&
+           exists $config{tagbase} &&
            defined $config{tagbase}) {
                $tag=$config{tagbase}."/".$tag;
        }
            defined $config{tagbase}) {
                $tag=$config{tagbase}."/".$tag;
        }
@@ -62,6 +63,7 @@ sub preprocess_taglink (@) { #{{{
                if (/(.*)\|(.*)/) {
                        my $tag=IkiWiki::linkpage($2);
                        $tags{$params{page}}{$tag}=1;
                if (/(.*)\|(.*)/) {
                        my $tag=IkiWiki::linkpage($2);
                        $tags{$params{page}}{$tag}=1;
+                       push @{$links{$params{page}}}, tagpage($tag);
                        return htmllink($params{page}, $params{destpage},
                                tagpage($tag),
                                linktext => IkiWiki::pagetitle($1));
                        return htmllink($params{page}, $params{destpage},
                                tagpage($tag),
                                linktext => IkiWiki::pagetitle($1));
@@ -69,6 +71,7 @@ sub preprocess_taglink (@) { #{{{
                else {
                        my $tag=IkiWiki::linkpage($_);
                        $tags{$params{page}}{$tag}=1;
                else {
                        my $tag=IkiWiki::linkpage($_);
                        $tags{$params{page}}{$tag}=1;
+                       push @{$links{$params{page}}}, tagpage($tag);
                        return htmllink($params{page}, $params{destpage},
                                tagpage($tag));
                }
                        return htmllink($params{page}, $params{destpage},
                                tagpage($tag));
                }