From c3732bafa002af48821b13a81fb1d84807eb439b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 26 Aug 2008 12:55:43 -0400 Subject: [PATCH] map: The fix for #449285 was buggy and broke display of parents in certian circumstances. The use of $dummy was not sufficient, because it only stuck around for the first element after a dummy parent, and was then lost. Instead, use a $addparent that contains the actual dummy parent, so it can be compared with the new item to see if we're still under that parent or have moved to another one. (cherry picked from commit 9b10f5eab22be36cf3b3a217076c76a669b4aafa) --- IkiWiki/Plugin/map.pm | 11 ++++++----- debian/changelog | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm index 5b6a843e7..1a3204988 100644 --- a/IkiWiki/Plugin/map.pm +++ b/IkiWiki/Plugin/map.pm @@ -71,7 +71,7 @@ sub preprocess (@) { #{{{ my $parent=""; my $indent=0; my $openli=0; - my $dummy=0; + my $addparent=""; my $map = "
\n\n"; } } - $dummy=0; while ($depth < $indent) { $indent--; $map .= "\n"; @@ -105,11 +105,12 @@ sub preprocess (@) { #{{{ $map .= "