You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
1.3 KiB

diff -ur HTML-FormatText-WithLinks-AndTables/lib/HTML/FormatText/WithLinks/AndTables.pm HTML-FormatText-WithLinks-AndTab-patched/lib/HTML/FormatText/WithLinks/AndTables.pm
--- HTML-FormatText-WithLinks-AndTables/lib/HTML/FormatText/WithLinks/AndTables.pm 2012-06-08 10:10:37.000000000 +1000
+++ HTML-FormatText-WithLinks-AndTab-patched/lib/HTML/FormatText/WithLinks/AndTables.pm 2012-07-24 16:17:19.964364582 +1000
@@ -134,7 +134,7 @@
for my $tr (@trs) { # *** 1st pass over rows
$max_col_heights[$row_count] = 0;
$col_lines[$row_count] = [];
- my @cols = $tr->look_down(_tag=>'td'); # no support for <th>. sorry.
+ my @cols = $tr->look_down(_tag=>qr/(td|th)/); # no support for <th>. sorry.
for (my $i = 0; $i < scalar @cols; $i++) {
my $td = $cols[$i]->clone;
my $new_tree = HTML::TreeBuilder->new;
@@ -167,7 +167,7 @@
SECOND_PASS: {
my $row_count = 0; # obviously, another counter...
for my $tr (@trs) { # *** 2nd pass over rows
- my @cols = $tr->look_down(_tag=>'td'); # no support for <th>. sorry.
+ my @cols = $tr->look_down(_tag=>qr/(td|th)/); # no support for <th>. sorry.
my $row_text; # the final string representing each row of reformatted text