Subject: | Last word may be eaten when parsing |
The output of the following script:
#!/usr/bin/perl
use HTML::TreeBuilder;
$tree = HTML::TreeBuilder->new->parse("ABC DEF GHI.");
warn $tree->dump;
__END__
look like this:
<html> @0 (IMPLICIT)
<head> @0.0 (IMPLICIT)
<body> @0.1 (IMPLICIT)
"ABC DEF"
This means that the last word ("GHI.") is missing in the parsed tree.
This can be workaround by either adding a newline to the string, or by
wrapping the text with some tag.
Regards,
Slaven