need to remove trailing slashes in not one, but 2 places
authorJoey Hess <joey@kodama.kitenet.net>
Sat, 17 Nov 2007 21:32:02 +0000 (16:32 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Sat, 17 Nov 2007 21:32:02 +0000 (16:32 -0500)
htmllink needs to do it because it uses the basename of the link as the link
text

bestlink needs to do it because it is not always called from htmllink

IkiWiki.pm

index eb003a1fb9992e940dec64d2a315cca4260307c2..81a634e2b185a4c1e32ac1539e90275777405d69 100644 (file)
@@ -407,6 +407,7 @@ sub bestlink ($$) { #{{{
                # absolute links
                $cwd="";
        }
+       $link=~s/\/$//;
 
        do {
                my $l=$cwd;
@@ -541,6 +542,7 @@ sub htmllink ($$$;@) { #{{{
        my $page=shift; # the page that will contain the link (different for inline)
        my $link=shift;
        my %opts=@_;
+
        $link=~s/\/$//;
 
        my $bestlink;