latin: international maritime signal flags
[sheet.git] / Shiar_Sheet / FormatChar.pm
index ee0c31065f9c7e716dafb92b38960d8af0a8b911..78e4a21fdbad97788b08565b5a5540352047b88e 100644 (file)
@@ -181,10 +181,12 @@ sub cell {
                }
        }
 
-       return sprintf('<td%s%s%s>%s%s',
-               defined $title  ? qq{ title="$title"}  : '',
-               @class ? sprintf(' class="%s"', join ' ', @class) : '',
-               $html || '',
+       return sprintf('<%s>%s%s',
+               join(' ', 'td',
+                       defined $title  ? qq{ title="$title"}  : (),
+                       @class ? sprintf('class="%s"', join ' ', @class) : (),
+                       $html || (),
+               ),
                $cell eq '' ? '&nbsp;' : $cell,
                $anno,
        );
@@ -225,9 +227,17 @@ sub table {
                        $colspan++;
                        next;
                }
+               elsif ($cell eq '>-') {
+                       $rows[-1] .= '<th>';
+                       next;
+               }
+               elsif ($cell =~ m/^</) {
+                       $rows[-1] .= '<td>'.$cell;
+                       next;
+               }
 
                $rows[-1] .= $self->cell($cell,
-                       $colspan > 1 && qq{ colspan="$colspan"},
+                       $colspan > 1 && qq{colspan="$colspan"},
                );
 
                $colspan = 1;