aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2008-12-21 12:50:30 -0500
committerJoey Hess <joey@gnu.kitenet.net>2008-12-21 12:50:30 -0500
commit9bee6db8c604efd705d6d808fca3194eb4873cf4 (patch)
tree5f4d6c35c0cd65fa18526f7512f4dfb271768abc /IkiWiki.pm
parentb2842b88385acb68569f00ed45b49f0cf5383983 (diff)
parent9e5f504e1a9c428580c17e13fc1f76bc38727e3c (diff)
downloadikiwiki-9bee6db8c604efd705d6d808fca3194eb4873cf4.tar
ikiwiki-9bee6db8c604efd705d6d808fca3194eb4873cf4.tar.gz
Merge commit 'smcv/comments'
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 47116089b..6747a3ba4 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -949,16 +949,16 @@ sub formattime ($;$) {
sub beautify_urlpath ($) {
my $url=shift;
- if ($config{usedirs}) {
- $url =~ s!/index.$config{htmlext}$!/!;
- }
-
# Ensure url is not an empty link, and if necessary,
# add ./ to avoid colon confusion.
- if ($url !~ /^\// && $url !~ /^\.\.\//) {
+ if ($url !~ /^\// && $url !~ /^\.\.?\//) {
$url="./$url";
}
+ if ($config{usedirs}) {
+ $url =~ s!/index.$config{htmlext}$!/!;
+ }
+
return $url;
}