summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-08-23 12:28:18 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-08-23 12:28:18 -0400
commit15a0a151bf08a2e4a12e6e3bbc6f047b14090979 (patch)
tree4aada74d17daa9bd62350ff51903400a986be532
parent7071d0b58667e36f22ddc95cc6602dcb1700438a (diff)
fix links to inserted parent pages
The parent page names had "/" prepended, which caused broken links.
-rw-r--r--IkiWiki/Plugin/map.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm
index 4a89fbc35..429493b9e 100644
--- a/IkiWiki/Plugin/map.pm
+++ b/IkiWiki/Plugin/map.pm
@@ -106,22 +106,22 @@ 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) {
- $dummy=1;
- $p.="/".shift(@bits);
+ my $p="";
+ $p.="/".shift(@bits) for 1..$indent+1;
+ $p=~s/^\///;
$map .= "<li>"
.htmllink($params{page}, $params{destpage},
$p, class => "mapparent",
noimageinline => 1)
."\n";
$openli=1;
+ $dummy=1;
}
else {
$openli=0;