2009-06-15 13:22:02 +02:00
|
|
|
input:
|
|
|
|
|
|
|
|
before.
|
|
|
|
\[[!map pages="sdfsdfsdfsd/*"]]
|
|
|
|
after.
|
|
|
|
|
|
|
|
Presuming that the pagespec does not match, output:
|
|
|
|
|
2009-06-15 13:29:23 +02:00
|
|
|
<p>before.
|
|
|
|
<div class="map">
|
|
|
|
<ul>
|
|
|
|
</div></p>
|
2009-06-15 13:22:02 +02:00
|
|
|
|
|
|
|
The UL element is not closed.
|
|
|
|
|
2009-06-15 13:28:36 +02:00
|
|
|
Patch[[!tag patch]]:
|
|
|
|
|
|
|
|
--- /usr/share/perl5/IkiWiki/Plugin/map.pm 2009-05-06 00:56:55.000000000 +0100
|
|
|
|
+++ IkiWiki/Plugin/map.pm 2009-06-15 12:23:54.000000000 +0100
|
|
|
|
@@ -137,11 +137,11 @@
|
|
|
|
$openli=1;
|
|
|
|
$parent=$item;
|
|
|
|
}
|
|
|
|
- while ($indent > 0) {
|
|
|
|
+ while ($indent > 1) {
|
|
|
|
$indent--;
|
|
|
|
$map .= "</li>\n</ul>\n";
|
|
|
|
}
|
|
|
|
- $map .= "</div>\n";
|
|
|
|
+ $map .= "</ul>\n</div>\n";
|
|
|
|
return $map;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-06-15 13:22:02 +02:00
|
|
|
-- [[Jon]]
|
2009-07-10 20:21:02 +02:00
|
|
|
|
|
|
|
> Strictly speaking, a `<ul>` with no `<li>`s isn't valid HTML either...
|
|
|
|
> could `map` instead delay emitting the first `<ul>` until it determines that
|
|
|
|
> it will have at least one item? Perhaps refactoring that function into
|
|
|
|
> something easier to regression-test would be useful. --[[smcv]]
|