1 Obvious and straightforward ;-)
2 tidy should be probably added to Suggests -- doc/ikiwiki.setup should also be updated.
3 (yes, I'm too lazy today...)
11 # requires 'tidy' binary, found in Debian or http://tidy.sf.net/
12 # mostly a proof-of-concept on how to use external filters.
13 # It is particularly useful when the html plugin is used.
14 package IkiWiki::Plugin::tidy;
22 IkiWiki::hook(type => "sanitize", id => "tidy", call => \&sanitize);
25 sub sanitize ($) { #{{{
26 open2(*IN, *OUT, 'tidy -quiet -xml -indent -utf8') or return shift;
27 # open2 doesn't respect "use open ':utf8'"
28 binmode (IN, ':utf8');
29 binmode (OUT, ':utf8');