latin: prevent line wrapping of code39 bars
[sheet.git] / latin.plp
index 8c2bef5a32019d82b639f0c48ff57c1b80407666..6de3fa5ce9e5eccf12a1686e2af2a4807cf51ec6 100644 (file)
--- a/latin.plp
+++ b/latin.plp
@@ -22,6 +22,17 @@ Html({
                src: url("/suetterlin.ttf");
        }
        #sütterlin td { font-family: Suetterlin }
+       #tap-code td,
+       #tap-simplified td {
+               line-height: 1ex;
+       }
+       #old-roman-cursive {
+               stroke-linecap: round;
+               stroke-linejoin: round;
+       }
+       #code-39 {
+               white-space: nowrap;
+       }
 
        svg path:not([fill]) {
                stroke: currentColor;
@@ -58,7 +69,21 @@ else {
                my ($title, $cells) = @{$row};
                printf '<tr id="%s">', (lc $title) =~ s/<[^>]+>//gr =~ s/\s+/-/gr;
                say '<th>', $title;
-               print /^<td/ ? $_ : "\t<td>$_\n" for @{$cells};
+               my $colspan = 1;
+               for (@{$cells}) {
+                       if ($_ eq '>') {
+                               $colspan++;
+                               next;
+                       }
+                       print "\t<td";
+                       if ($colspan > 1) {
+                               print " colspan=$colspan";
+                               $colspan = 1;
+                       }
+                       print ' class=', $_ ? 'ex' : 'u-invalid' if s/^-//;
+                       print '>';
+                       say;
+               }
        }
        say "</table>\n";
 }