latin: common styling for tap code rows
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 2 Apr 2017 14:05:53 +0000 (16:05 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 24 Apr 2017 18:25:54 +0000 (20:25 +0200)
latin.plp
writing-latn.inc.pl

index 8c2bef5..6d23534 100644 (file)
--- a/latin.plp
+++ b/latin.plp
@@ -22,6 +22,10 @@ Html({
                src: url("/suetterlin.ttf");
        }
        #sütterlin td { font-family: Suetterlin }
+       #tap-code td,
+       #tap-simplified td {
+               line-height: 1ex;
+       }
 
        svg path:not([fill]) {
                stroke: currentColor;
@@ -58,7 +62,7 @@ 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};
+               say "\t", '<td>' x !/^<td/, $_ for @{$cells};
        }
        say "</table>\n";
 }
index 018a632..0ce54d3 100644 (file)
@@ -3,7 +3,7 @@ use utf8;
 sub disptap {
        return map {
                m/\A(-?)(\d)(\d)/;
-               sprintf('<td style="line-height:1ex"%s>%s<br>%s</td>',
+               sprintf('<td%s>%s<br>%s',
                        ' class=ex' x !!$1,
                        '·' x $2, '·' x $3,
                );