From d23943ebea567f489724b1286cefe3fd9d0d3c54 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 23 Aug 2008 12:37:19 -0400 Subject: [PATCH 1/1] fix off-by-one, and fix link The link was broken if the inserted dir was not under the destpage --- IkiWiki/Plugin/map.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm index 429493b9e..44fda73ca 100644 --- a/IkiWiki/Plugin/map.pm +++ b/IkiWiki/Plugin/map.pm @@ -113,11 +113,11 @@ sub preprocess (@) { #{{{ } if ($depth > $indent) { my $p=""; - $p.="/".shift(@bits) for 1..$indent+1; + $p.="/".shift(@bits) for 1..$indent; $p=~s/^\///; $map .= "
  • " .htmllink($params{page}, $params{destpage}, - $p, class => "mapparent", + "/".$common_prefix."/".$p, class => "mapparent", noimageinline => 1) ."\n"; $openli=1; -- 2.39.2