aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/toggle.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-09-28 16:21:03 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-09-28 16:21:03 -0400
commit3525a6b7f23421779091daad7a1e19b02d7db141 (patch)
tree88793193017941cd76d6d40d4663a301be7d196a /IkiWiki/Plugin/toggle.pm
parent13b525d8eab91e197b8f356c3efb9719513c5983 (diff)
downloadikiwiki-3525a6b7f23421779091daad7a1e19b02d7db141.tar
ikiwiki-3525a6b7f23421779091daad7a1e19b02d7db141.tar.gz
toggle, relativedate: Support templates that add attributes to the body tag.
Diffstat (limited to 'IkiWiki/Plugin/toggle.pm')
-rw-r--r--IkiWiki/Plugin/toggle.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm
index aae8cdf84..ef066a42f 100644
--- a/IkiWiki/Plugin/toggle.pm
+++ b/IkiWiki/Plugin/toggle.pm
@@ -68,7 +68,7 @@ sub format (@) {
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>)!$1.include_javascript($params{page})!em)) {
+ if (! ($params{content}=~s!^(<body[^>]*>)!$1.include_javascript($params{page})!em)) {
# no </body> tag, probably in preview mode
$params{content}=include_javascript($params{page}, 1).$params{content};
}