latin: plain html output instead of FormatChar module
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 21 Sep 2015 16:21:34 +0000 (18:21 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 21 Sep 2015 22:20:08 +0000 (00:20 +0200)
latin.plp
writing-latn.inc.pl

index 12482e10566ad26fe45ff9c287c20d2599b4c6d5..8ad53c0de1db251c6f0e20993874f5e887c41a01 100644 (file)
--- a/latin.plp
+++ b/latin.plp
@@ -31,23 +31,14 @@ and <a href="/unicode">common chars</a>.</p>
 <div class="-diinfo">
 
 <:
 <div class="-diinfo">
 
 <:
-use Shiar_Sheet::FormatChar;
-my $glyphs = Shiar_Sheet::FormatChar->new;
-unless (exists $get{v}) {
-       $glyphs->{unicode}--;
-       $glyphs->{anno}  = [];
-       $glyphs->{style} = 0;
-}
-
 my @table = do 'writing-latn.inc.pl';
 if ($! or $@) {
        printf "<p class=error>Table data not found: <em>%s</em>.</p>\n", $@ || $!;
 }
 else {
 my @table = do 'writing-latn.inc.pl';
 if ($! or $@) {
        printf "<p class=error>Table data not found: <em>%s</em>.</p>\n", $@ || $!;
 }
 else {
-       print $glyphs->table([map {
-               ref $_ ne 'ARRAY' ? ".>$_"
-                       : exists $get{uc} ? map {uc} @$_ : @$_
-       } @table]);
+       print '<table class="glyphs">';
+       print ref $_ ne 'ARRAY' ? "<tr><th>$_" : map {"<td>$_"} @$_ for @table;
+       print "</table>\n\n";
 }
 
 print "</div>\n";
 }
 
 print "</div>\n";
index 5759439a1aa6298180681dc66766636169cc6d0e..6c0edad04f1d9589d968fa3c28b90cde0f640bf1 100644 (file)
@@ -141,8 +141,7 @@ my %C = qw(red #EC1C24  blue #3953A3  yellow #F9EC31  black #231F20);
                local $_ = $_;
                s/[1-4]\K(?=[4-9])/ /;
                tr/1-9/↙←↖↑↗→↘↓/;
                local $_ = $_;
                s/[1-4]\K(?=[4-9])/ /;
                tr/1-9/↙←↖↑↗→↘↓/;
-               s{(\S)(?=.)}{<span style="position:absolute">$1</span>}
-                       or s/^/<span>/ and $_ .= '</span>';
+               s{(\S)(?=.)}{<span style="position:absolute">$1</span>};
                $_
        }
        qw(
                $_
        }
        qw(