Handle the case when HTML got tidied.

This fixes debian bug #492529.
master
Enrico Zini 2008-07-26 23:05:22 +01:00 committed by Joey Hess
parent dd40fbdf03
commit 02078c406c
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,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