diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-08-23 12:48:01 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-08-23 12:48:01 -0400 |
commit | d84e43faacbeb1e43224aa65d5ea8c19e657779e (patch) | |
tree | 0b0aa46b9a0003630a5a9c139b2367dae23d23c8 /IkiWiki | |
parent | d23943ebea567f489724b1286cefe3fd9d0d3c54 (diff) |
fix my broken fix
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/map.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm index 44fda73ca..4c2a15b01 100644 --- a/IkiWiki/Plugin/map.pm +++ b/IkiWiki/Plugin/map.pm @@ -88,6 +88,7 @@ sub preprocess (@) { #{{{ if defined $common_prefix && length $common_prefix; my $depth = ($item =~ tr/\//\//) + 1; my $baseitem=IkiWiki::dirname($item); + print STDERR "!! parent: $parent baseitem: $baseitem\n"; while (length $parent && length $baseitem && $baseitem !~ /^\Q$parent\E(\/|$)/) { $parent=IkiWiki::dirname($parent); last if !$dummy && length $parent && $baseitem =~ /^\Q$parent\E(\/|$)/; @@ -106,18 +107,19 @@ sub preprocess (@) { #{{{ } } my @bits=split("/", $item); + my $p=""; + $p.="/".shift(@bits) for 1..$indent; while ($depth > $indent) { $indent++; if ($indent > 1) { $map .= "<ul>\n"; } if ($depth > $indent) { - my $p=""; - $p.="/".shift(@bits) for 1..$indent; - $p=~s/^\///; + $p.="/".shift(@bits); + #$p=~s/^\///; $map .= "<li>" .htmllink($params{page}, $params{destpage}, - "/".$common_prefix."/".$p, class => "mapparent", + "/".$common_prefix.$p, class => "mapparent", noimageinline => 1) ."\n"; $openli=1; |