summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2007-11-17 16:32:02 -0500
committerJoey Hess <joey@kodama.kitenet.net>2007-11-17 16:32:02 -0500
commit3e17b7d6122c2b1cbfa90dc04b419635342e2b02 (patch)
treeba96e9d73d5719f26a14d635108ec6a14faf0852
parente79eac82b0b6b8769c72e0ebeeac278718ae1c58 (diff)
need to remove trailing slashes in not one, but 2 places
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
-rw-r--r--IkiWiki.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index eb003a1fb..81a634e2b 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -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;