3 # requires 'tidy' binary, found in Debian or http://tidy.sf.net/
4 # mostly a proof-of-concept on how to use external filters.
5 # It is particularly useful when the html plugin is used.
8 package IkiWiki::Plugin::htmltidy;
16 IkiWiki::hook(type => "format", id => "tidy", call => \&format);
20 open2(*IN, *OUT, 'tidy -quiet -asxhtml -indent -utf8 --show-warnings no') or return shift;
21 # open2 doesn't respect "use open ':utf8'"
22 binmode (IN, ':utf8');
23 binmode (OUT, ':utf8');