charset: newline after each cell in HTML source
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 9 Apr 2017 02:03:45 +0000 (04:03 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 24 Apr 2017 23:51:41 +0000 (01:51 +0200)
charset.plp

index ca38182a2e6fa134c9bab3441d79d36aef27eadb..b6b61b9e5df2f22fdb29df82dbcbea25d4c6e61d 100644 (file)
@@ -388,7 +388,7 @@ sub range_cell {
        $attr .= $1 if $class and $class =~ s/( \w+="[^"]*")//;
        $attr .= sprintf ' class="%s"', $class if $class;
        $attr .= sprintf ' title="%s"', EscapeHTML($title) if $title;
-       return "<td$attr>$name";
+       return "<td$attr>$name\n";
 }
 
 for my $row (@request) {
@@ -431,6 +431,8 @@ for my $row (@request) {
                                printf '%X', ($offset + $row->{offset}) / $rowdiv;
                        }
                }
+               say '';
+
                for (1 .. $cols) {
                        if ($row->{cell}) {
                                print range_cell($row, $offset);
@@ -458,12 +460,11 @@ for my $row (@request) {
                                next;
                        }
 
-                       print "\n".$glyphs->glyph_cell($glyph);
+                       say $glyphs->glyph_cell($glyph);
                }
                continue {
                        $offset += $colsize;
                }
-               print "\n";
        }
        say '</table></div>';
 }