]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/relativedate.pm
Follow up.
[git.ikiwiki.info.git] / IkiWiki / Plugin / relativedate.pm
index e5fa8e1a5822983a6be7c53e3645f8ae77eb2be6..06df2efd58cba5697a20f99be8730bd61a06e702 100644 (file)
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::relativedate;
 use warnings;
 no warnings 'redefine';
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 use POSIX;
 use Encode;
 
@@ -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};
        }