Subject: | Buggy use of grep in html2latex |
Date: | Mon, 14 Nov 2011 23:22:38 +0000 |
To: | bug-html2latex [...] rt.cpan.org |
From: | Devon Luke Buchanan <db505 [...] cam.ac.uk> |
I've found and resolved a bug in html2latex – it was stopping table parsing
from working. I've included a patch.
To reproduce this problem, run the 1.0 version of html2latex on html that
contains a table that has whitespace inside (i.e. "<table>\n <tr>\n
<td>..." not "<table><tr><td>..."). You will note your library throws an
error about a non-existant content_list property. This may vary by Perl
version – I used v5.10.1.
The reason for this is that you've used a string instead of a regex as the
first argument to grep meant it didn't filter out any inappropriate objects
while constructing tables. Since the content_list of each element contains
a string as well as html elements, your library would throw an error when
it tried to access the non-existant content_list of that string.
Please do tell me if the problem isn't reproducible or isn't clear.
-- Devon Buchanan
Message body is not shown because sender requested not to inline it.