]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/tag.pm
Merge branch 'master' into comments
[git.ikiwiki.info.git] / IkiWiki / Plugin / tag.pm
index 158657507331e2dd538f31c91a44c4cb09aec95a..d725ef9b3a948f3b5967f66d5ac6dde887a1f633 100644 (file)
@@ -43,7 +43,8 @@ sub tagpage ($) { #{{{
                        
        if ($tag !~ m{^\.?/} &&
            defined $config{tagbase}) {
-               $tag=$config{tagbase}."/".$tag;
+               $tag="/".$config{tagbase}."/".$tag;
+               $tag=~y#/#/#s; # squash dups
        }
 
        return $tag;
@@ -55,13 +56,7 @@ sub taglink ($$$;@) { #{{{
        my $tag=shift;
        my %opts=@_;
 
-       my $link=tagpage($tag);
-
-       # Force tag creation links to create the tag under /tagbase,
-       # if there is a tagbase and this tag used it.
-       $link="/".$link if $tag ne $link;
-
-       return htmllink($page, $destpage, $link, %opts);
+       return htmllink($page, $destpage, tagpage($tag), %opts);
 } #}}}
 
 sub preprocess_tag (@) { #{{{