diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-08-23 12:37:19 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-08-23 12:37:19 -0400 |
commit | d23943ebea567f489724b1286cefe3fd9d0d3c54 (patch) | |
tree | 3dcab6efc33ac75542f6cabebfee8b4c83953c32 | |
parent | 15a0a151bf08a2e4a12e6e3bbc6f047b14090979 (diff) |
fix off-by-one, and fix link
The link was broken if the inserted dir was not under the destpage
-rw-r--r-- | IkiWiki/Plugin/map.pm | 4 |
1 files 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 .= "<li>" .htmllink($params{page}, $params{destpage}, - $p, class => "mapparent", + "/".$common_prefix."/".$p, class => "mapparent", noimageinline => 1) ."\n"; $openli=1; |