From 7144eb3973ac73a5f79440f91a7c01665fb83aa4 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 14 Mar 2006 05:33:44 +0000 Subject: Some fixes to the parent links, I think the link to the index will be right in all cases now. --- ikiwiki | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ikiwiki') diff --git a/ikiwiki b/ikiwiki index f95ea0f09..7e140bbec 100755 --- a/ikiwiki +++ b/ikiwiki @@ -307,15 +307,14 @@ sub parentlinks ($) { #{{{ my $skip=1; foreach my $dir (reverse split("/", $page)) { if (! $skip) { + $path.="../"; unshift @ret, { url => "$path$dir.html", page => $dir }; } else { $skip=0; } - $path.="../"; } - $path=~s!../!!; - unshift @ret, { url => $path , page => $config{wikiname} }; + unshift @ret, { url => length $path ? $path : ".", page => $config{wikiname} }; return @ret; } #}}} -- cgit v1.2.3