diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-08-04 07:41:02 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-08-04 07:41:02 +0000 |
commit | 0708bb8aecaa6f4edcb60d84ed6555d61f83a2bc (patch) | |
tree | df03d054883ad1c42ae2586ee224a30a7bb57100 /IkiWiki/Plugin | |
parent | acaee3d0bce78b6e6d8989821150d28a87026ff0 (diff) | |
download | ikiwiki-0708bb8aecaa6f4edcb60d84ed6555d61f83a2bc.tar ikiwiki-0708bb8aecaa6f4edcb60d84ed6555d61f83a2bc.tar.gz |
* Don't run tidy with -xml as that fails if the input is not well-formed.
Run it with -asxhtml instead, so it will output well-formed xhtml no
matter what the input.
* Disable tidy warnings too.
* Add a new format hook, and make tidy use it, since tidy can really only
operate on and output complete html documents, not the body chunks
that sanitise gets.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/htmltidy.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/htmltidy.pm b/IkiWiki/Plugin/htmltidy.pm index fa08e4ef5..6c1fba98e 100644 --- a/IkiWiki/Plugin/htmltidy.pm +++ b/IkiWiki/Plugin/htmltidy.pm @@ -13,11 +13,11 @@ use IkiWiki; use IPC::Open2; sub import { #{{{ - IkiWiki::hook(type => "sanitize", id => "tidy", call => \&sanitize); + IkiWiki::hook(type => "format", id => "tidy", call => \&format); } # }}} -sub sanitize ($) { #{{{ - open2(*IN, *OUT, 'tidy -quiet -xml -indent -utf8') or return shift; +sub format ($) { #{{{ + open2(*IN, *OUT, 'tidy -quiet -asxhtml -indent -utf8 --show-warnings no') or return shift; # open2 doesn't respect "use open ':utf8'" binmode (IN, ':utf8'); binmode (OUT, ':utf8'); |