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.53.1~11 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/788a294cf909c1fea79e00161bba0e282d877f9d Handle the case when HTML got tidied. This fixes debian bug #492529. (cherry picked from commit 02078c406ca71780e45af0f4dea6ceafcd56c730) --- diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm index ef30fe6b6..825b55d68 100644 --- a/IkiWiki/Plugin/toggle.pm +++ b/IkiWiki/Plugin/toggle.pm @@ -106,7 +106,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