latin: omit span container on sample svg
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 25 Aug 2021 04:54:54 +0000 (06:54 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 25 Aug 2021 04:57:53 +0000 (06:57 +0200)
latinsample.js
writing-latn.inc.pl

index 406cac12cdb355f3dd38070c9ccf7172ead633ec..846e5004fa97a9b8529c9251c929dcef7006521e 100644 (file)
@@ -44,7 +44,9 @@ function appendsample() {
                                output += cols[col].split('&nbsp;')[final ? 1 : 0];
                        }
                        else if (col < cols.length) {
-                               output += '<span>' + (cols[col] || ' ') + '</span>';
+                               var final = cols[col] || ' ';
+                               if (!/^<svg/.test(cols[col])) final = `<span>${final}</span>`;
+                               output += final;
                        }
                        else {
                                output += '<b> </b>';
index 42a680c4ebc823d4be45bed45dab38e6baa28d6f..ad13ae5fe3905112aceb1c4843d2e5663260811a 100644 (file)
@@ -15,10 +15,10 @@ my @wrapstyle = (
        'td { white-space: normal; word-spacing: 10em }',
                # force line break between words
        '.sample { word-spacing: 0 }',
-       '.sample span { margin-right: 1ex; white-space: nowrap; display: inline-block }',
+       '.sample svg { margin-right: 1ex; white-space: nowrap; display: inline-block }',
                # larger space between letters
 );
-my $spacestyle = '.sample span { margin-right: 0.5ex }';  # separate letters
+my $spacestyle = '.sample svg { margin-right: 0.5ex }';  # separate letters
 my @tapstyle = (
        @wrapstyle,
        '{ line-height: 1ex }',
@@ -153,7 +153,7 @@ roman => {
        name => 'Old Roman Cursive',
        style => [
                'svg path { stroke-linecap: round; stroke-linejoin: round }',
-               '.sample span { margin-right: -10px }',
+               '.sample svg { margin-right: -10px }',
        ],
        list => [
                map {
@@ -643,7 +643,7 @@ dni => {
        name => "D'ni",
        style => [
                'svg { border: 1px solid currentColor }',
-               '.sample span + span svg { border-left: 0 }',
+               '.sample svg + svg { border-left: 0 }',
        ],
        list => [
                map {