diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2008-12-21 12:50:30 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2008-12-21 12:50:30 -0500 |
commit | 9bee6db8c604efd705d6d808fca3194eb4873cf4 (patch) | |
tree | 5f4d6c35c0cd65fa18526f7512f4dfb271768abc /IkiWiki.pm | |
parent | b2842b88385acb68569f00ed45b49f0cf5383983 (diff) | |
parent | 9e5f504e1a9c428580c17e13fc1f76bc38727e3c (diff) |
Merge commit 'smcv/comments'
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 10 |
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; } |