common: join stylesheets html inline
[sheet.git] / charset.plp
index b0d3b834b477f366d3cc534120fc59927bb123f3..3bf294e4489b4a54914bb03e97ab1e6fdac9b5f1 100644 (file)
@@ -89,9 +89,9 @@ my @request = map {
                        }
                }
                else {
-                       print "<p>Encoding $input unknown</p>\n";
+                       say "<p class=error>Encoding <q>$input</q> unknown</p>";
                }
-               \%row;
+               $row{set} ? \%row : ();
        }
        else {
                ();
@@ -123,7 +123,7 @@ sub range_cell {
                $cols = $len if $len < $cols; #TODO: optimise
                if ($len -= $cols) {
                        # continued on new row
-                       $table->{$offset + $nibsize*$cols} = [$len*$nibsize, "$class joinu", $name, $title];
+                       $table->{$offset + $nibsize*$cols} //= [$len*$nibsize, "$class joinu", $name, $title];
                        $name = '';
                        $class .= ' joind';
                }
@@ -133,7 +133,7 @@ sub range_cell {
                # multiple full rows
                if ($len -= $rows << 4) {
                        # partial row remains
-                       $table->{$offset + $nibsize*$rows * 16} = [$len*$nibsize, "$class joinu", '', $title];
+                       $table->{$offset + $nibsize*$rows * 16} //= [$len*$nibsize, "$class joinu", '', $title];
                        $class .= ' joind';
                }
                $attr .= sprintf ' rowspan=%d', $rows;