aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/recentchangesdiff.pm4
-rw-r--r--IkiWiki/Plugin/relativedate.pm4
-rw-r--r--IkiWiki/Plugin/toggle.pm4
3 files changed, 6 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/recentchangesdiff.pm b/IkiWiki/Plugin/recentchangesdiff.pm
index eb358be67..0093c655e 100644
--- a/IkiWiki/Plugin/recentchangesdiff.pm
+++ b/IkiWiki/Plugin/recentchangesdiff.pm
@@ -60,9 +60,9 @@ sub pagetemplate (@) {
sub format (@) {
my %params=@_;
- if (! ($params{content}=~s!^(<body[^>]*>)!$1.include_javascript($params{page})!em)) {
+ if (! ($params{content}=~s!^(\s*</body[^>]*>)!include_javascript($params{page}).$1!em)) {
# no <body> tag, probably in preview mode
- $params{content}=include_javascript(undef).$params{content};
+ $params{content}=$params{content}.include_javascript(undef);
}
return $params{content};
}
diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm
index 4ae0be861..083966ad2 100644
--- a/IkiWiki/Plugin/relativedate.pm
+++ b/IkiWiki/Plugin/relativedate.pm
@@ -26,9 +26,9 @@ sub getsetup () {
sub format (@) {
my %params=@_;
- if (! ($params{content}=~s!^(<body[^>]*>)!$1.include_javascript($params{page})!em)) {
+ if (! ($params{content}=~s!^(\s*</body[^>]*>)!include_javascript($params{page}).$1!em)) {
# no <body> tag, probably in preview mode
- $params{content}=include_javascript(undef).$params{content};
+ $params{content}=$params{content}.include_javascript(undef);
}
return $params{content};
}
diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm
index af4d2ba3a..eea6e8861 100644
--- a/IkiWiki/Plugin/toggle.pm
+++ b/IkiWiki/Plugin/toggle.pm
@@ -68,9 +68,9 @@ 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!^(\s*</body[^>]*>)!include_javascript($params{page}).$1!em)) {
# no <body> tag, probably in preview mode
- $params{content}=include_javascript(undef).$params{content};
+ $params{content}=$params{content}.include_javascript(undef);
}
}
return $params{content};