]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/relativedate.pm
remember autofiles always
[git.ikiwiki.info.git] / IkiWiki / Plugin / relativedate.pm
index e5fa8e1a5822983a6be7c53e3645f8ae77eb2be6..7f006af839e7cf1eb50002c73262e7aac3234291 100644 (file)
@@ -4,8 +4,8 @@ package IkiWiki::Plugin::relativedate;
 use warnings;
 no warnings 'redefine';
 use strict;
-use IkiWiki 2.00;
-use POSIX;
+use IkiWiki 3.00;
+use POSIX ();
 use Encode;
 
 sub import {
@@ -26,7 +26,7 @@ sub getsetup () {
 sub format (@) {
         my %params=@_;
 
-       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};
        }