unicode: prevent empty row at table header rows
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 19 May 2010 21:08:40 +0000 (21:08 +0000)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 19 May 2010 21:14:25 +0000 (21:14 +0000)
Any table <thead> was incorrectly prefixed by <tr>, causing invalid html
<tr><thead><tr> sequences.

Shiar_Sheet/FormatChar.pm

index 656252c34b29bdad403cc26e35010870581d2d49..a80625839c6386d9b80c1c18bae5a2798695da0a 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 use Data::Dump 'pp';
 use PLP::Functions 'EscapeHTML';
 
 use Data::Dump 'pp';
 use PLP::Functions 'EscapeHTML';
 
-our $VERSION = '1.02';
+our $VERSION = '1.03';
 
 our $diinfo = do 'digraphs.inc.pl';
 our %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
 
 our $diinfo = do 'digraphs.inc.pl';
 our %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
@@ -142,7 +142,7 @@ sub table {
        for my $cell (@$digraphs) {
                if ($cell =~ s/^\.//) {
                        # dot indicates start of a new row
        for my $cell (@$digraphs) {
                if ($cell =~ s/^\.//) {
                        # dot indicates start of a new row
-                       push @rows, '';
+                       push @rows, '<tr>';
                        if ($cell =~ s/^>//) {
                                # header cell text follows
                                $cell =~ s/_/ /g;  # underscores may be used instead of whitespace (for qw//ability)
                        if ($cell =~ s/^>//) {
                                # header cell text follows
                                $cell =~ s/_/ /g;  # underscores may be used instead of whitespace (for qw//ability)
@@ -165,7 +165,7 @@ sub table {
 
        return sprintf qq{<table class="glyphs%s">\n%s</table>\n},
                $self->{digraph} || $self->{unicode} >= 0 ? ' dilabel' : '',
 
        return sprintf qq{<table class="glyphs%s">\n%s</table>\n},
                $self->{digraph} || $self->{unicode} >= 0 ? ' dilabel' : '',
-               join '', map {"<tr>$_\n"} @rows;
+               join '', map {"$_\n"} @rows;
 }
 
 sub print {
 }
 
 sub print {