]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/htmltidy.pm
revert colon part of change
[git.ikiwiki.info.git] / IkiWiki / Plugin / htmltidy.pm
index 19271b1366a71d848b69f36b2edc27e23c87b7da..d9aaba4ca1f4e7c6d3ed631089584071df5a2b3f 100644 (file)
@@ -13,16 +13,25 @@ use IkiWiki 2.00;
 use IPC::Open2;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "tidy", call => \&getsetup);
        hook(type => "sanitize", id => "tidy", call => \&sanitize);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 sub sanitize (@) { #{{{
        my %params=@_;
 
        my $pid;
        my $sigpipe=0;
        $SIG{PIPE}=sub { $sigpipe=1 };
-       $pid=open2(*IN, *OUT, 'tidy -quiet -asxhtml -utf8 --show-body-only yes --show-warnings no --tidy-mark no');
+       $pid=open2(*IN, *OUT, 'tidy -quiet -asxhtml -utf8 --show-body-only yes --show-warnings no --tidy-mark no --markup yes');
        
        # open2 doesn't respect "use open ':utf8'"
        binmode (IN, ':utf8');