use warnings;
use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
use IPC::Open2;
-sub import { #{{{
+sub import {
hook(type => "getsetup", id => "tidy", call => \&getsetup);
hook(type => "sanitize", id => "tidy", call => \&sanitize);
-} # }}}
+}
-sub getsetup () { #{{{
+sub getsetup () {
return
plugin => {
safe => 1,
rebuild => undef,
},
-} #}}}
+}
-sub sanitize (@) { #{{{
+sub sanitize (@) {
my %params=@_;
my $pid;
waitpid $pid, 0;
$SIG{PIPE}="DEFAULT";
- return "" if $sigpipe || ! defined $ret;
+ if ($sigpipe || ! defined $ret) {
+ return gettext("htmltidy failed to parse this html");
+ }
return $ret;
-} # }}}
+}
1