Specify types of messages to ignore. Note that the ignore flags must be set <B>beforeB> calling parse(). You can call ignore() as many times as necessary to set up all your restrictions; the options will stack up.
o type => TIDY_INFO|TIDY_WARNING|TIDY_ERROR
Specifies the type of messages you want to ignore, either info or warnings or errors. If you wanted, you could call ignore on all three and get no messages at all.
$tidy->ignore( type => TIDY_WARNING );
o text => qr/regex/ o text => [ qr/regex1/, qr/regex2/, ... ]
Checks the text of the message against the specified regex or regexes, and ignores the message if theres a match. The value for the text parm may be either a regex, or a reference to a list of regexes.
$tidy->ignore( text => qr/DOCTYPE/ ); $tidy->ignore( text => [ qr/unsupported/, qr/proprietary/i ] );
parse( CW$filename, CW$str [, CW$str...] )Parses a string, or list of strings, that make up a single HTML file.
The $filename parm is only used as an identifier for your use. The file is not actually read and opened.
Returns true if all went OK, or false if there was some problem calling tidy, or parsing tidys output.
clean( CW$str [, CW$str...] )Cleans a string, or list of strings, that make up a single HTML file.
HTML::Tidy requires that tidyp be installed on your system. You can obtain tidyp through your distributions package manager (make sure you install the development package with headers), or from the tidyp Git repository at <http://github.com/petdance/tidyp>.
HTML::Tidy is different from HTML::Lint in a number of crucial ways.
o Its not pure Perl
HTML::Tidy is mostly a happy wrapper around tidyp.
o The real work is done by someone else
Changes to tidyp may come down the pipe that I dont have control over. Thats the price we pay for having it do a darn good job.
o Its no longer bundled with its Test:: counterpart
HTML::Lint came bundled with Test::HTML::Lint, but Test::HTML::Tidy is a separate distribution. This saves the people who dont want the Test:: framework from pulling it in, and all its prerequisite modules.
Please report any bugs or feature requests at the issue tracker on github <http://github.com/petdance/html-tidy/issues>. I will be notified, and then youll automatically be notified of progress on your bug as I make changes.
Please do NOT use <http://rt.cpan.org>.
You can find documentation for this module with the perldoc command.
You can also look for information at:
o HTML::Tidys issue queue at github o AnnoCPAN: Annotated CPAN documentation o CPAN Ratings o search.cpan.org o Git source code repository
Thanks to Jonathan Rockway and Robert Bachmann for contributions.
Andy Lester, <andy at petdance.com>
Copyright (C) 2005-2013 by Andy Lester
This library is free software. You mean modify or distribute it under the Artistic License v2.0.
|perl v5.20.3||HTML::TIDY (3)||2013-09-22|