From: Enrico Zini Date: Sat, 26 Jul 2008 22:05:22 +0000 (+0100) Subject: Handle the case when HTML got tidied. X-Git-Tag: 2.55~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=02078c406ca71780e45af0f4dea6ceafcd56c730;p=ikiwiki.git Handle the case when HTML got tidied. This fixes debian bug #492529. --- diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm index cd9617e25..e203defb0 100644 --- a/IkiWiki/Plugin/toggle.pm +++ b/IkiWiki/Plugin/toggle.pm @@ -110,7 +110,7 @@ sub preprocess_toggleable (@) { #{{{ sub format (@) { #{{{ my %params=@_; - if ($params{content}=~s!(
)
!$1!g) { + if ($params{content}=~s!(
\s*)
!$1!g) { $params{content}=~s/
//g; if (! ($params{content}=~s!^!$javascript!m)) { # no tag, probably in preview mode