]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/map.pm
fix off-by-one, and fix link
[git.ikiwiki.info.git] / IkiWiki / Plugin / map.pm
index 429493b9ef4f9b61cd0fd354d25772cd155ecf7c..44fda73ca452e0bd11ad3f79d2738b19fca84e3f 100644 (file)
@@ -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;