#!perl -T use warnings; use strict; use Test::More tests => 1; use HTML::Tidy; my $tidy = HTML::Tidy->new({ tidy_mark => 0, add_xml_decl => 1, output_xhtml => 1, doctype => 'strict', clean => 1, css_prefix => 'myprefix', drop_empty_paras => 0, enclose_block_text => 1, escape_cdata => 1, hide_comments => 1, replace_color => 1, repeated_attributes => 'keep-first', break_before_br => 1, vertical_space => 1, newline => 'cr', }); my $input=<<'EOD';

example

Here's some ed and
eakfest MarkUp: ...

EOD my $expected =<<'EOD';

example

Here's some ed and
eakfest MarkUp: ...

EOD my @expected = split(/\n/, $expected); my $result = $tidy->clean( $input ); my @result = split(/\r/, $result); is_deeply( \@result, \@expected, 'Cleaned stuff looks like what we expected');