From: Joey Hess Date: Sat, 23 Aug 2008 16:37:19 +0000 (-0400) Subject: fix off-by-one, and fix link X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/d23943ebea567f489724b1286cefe3fd9d0d3c54 fix off-by-one, and fix link The link was broken if the inserted dir was not under the destpage --- 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;