]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Handle the case when HTML got tidied.
authorEnrico Zini <enrico@enricozini.org>
Sat, 26 Jul 2008 22:05:22 +0000 (23:05 +0100)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 26 Aug 2008 16:43:46 +0000 (12:43 -0400)
This fixes debian bug #492529.
(cherry picked from commit 02078c406ca71780e45af0f4dea6ceafcd56c730)

IkiWiki/Plugin/toggle.pm

index ef30fe6b6ddce2349820da08401c2ccf376845a8..825b55d68b5592017d02ae53cd221df41fa97b6e 100644 (file)
@@ -106,7 +106,7 @@ sub preprocess_toggleable (@) { #{{{
 sub format (@) { #{{{
         my %params=@_;
 
-       if ($params{content}=~s!(<div class="toggleable(?:-open)?" id="[^"]+">)</div>!$1!g) {
+       if ($params{content}=~s!(<div class="toggleable(?:-open)?" id="[^"]+">\s*)</div>!$1!g) {
                $params{content}=~s/<div class="toggleableend">//g;
                if (! ($params{content}=~s!^<body>!<body>$javascript!m)) {
                        # no </body> tag, probably in preview mode