Subject: | Parser ignores last word if input string does not end with \n |
The following script
use HTML::TreeBuilder;
my $html = HTML::TreeBuilder->new();
$html->parse("1 2 3");
print $html->as_HTML;
outputs
<html><head></head><body>1 2</body></html>
which is wrong, in my opinion.
It should be
<html><head></head><body>1 2 3</body></html>
I have found that adding a \n to the input string will prevent this
problem from occurring.