Subject: | HTML::Element::as_text() removes space between words |
Hi,
See this:
$ echo '<p>eee</p><p>fff</p>' > /tmp/test.html
$ perl -MHTML::TreeBuilder -e '$t = HTML::TreeBuilder->new; $t-
Show quoted text
>parse_file("/tmp/test.html"); $t->eof; print $t->as_text, "\n"'
eeefff
But it should print "eee fff". Because of this bug, $t->as_text =~ /
\bfff\b/ will evaluate to false while it should be true.
Same thing with no_space_compacting:
$ perl -MHTML::TreeBuilder -e '$t = HTML::TreeBuilder->new; $t-
Show quoted text>no_space_compacting(1); $t->parse_file("/tmp/test.html"); $t->eof;
print $t->as_text, "\n"'
eeefff