keyboard/altgr/index: wrap some long code lines
[sheet.git] / keyboard / altgr / index.inc.plp
index e9179c63d7234055f12890e4817595acbc5388ac..a74e01228f8eee098bba96f289779b35f494c104 100644 (file)
@@ -8,7 +8,7 @@ my $indexfile = "$dirbase/index";
 
 Html({
        title => "altgr keyboard cheat sheets",
-       version => '1.2',
+       version => '1.3',
        description => [
                "Overview of alternate keyboard modes,",
                "offering extended Unicode characters if a modifier key",
@@ -157,7 +157,8 @@ for my $inc (@incs) {
                print '</a>', "\n\t";
                for my $mode ($table->{mode} ? sort keys %{ $table->{mode} } : '') {
                        print '<span class=graph>';
-                       printf '<label>%s</label>', s/\s.*//r for $table->{def}{''}{$mode}[1] || ();
+                       printf "<label>%s</label>", m/^(\S*)/
+                               for $mode && $table->{mode}{$mode} || ();
                        for my $g (sort keys %{ $table->{inventory}{$mode} }) {
                                printf '<span class="%s" style="width:%.0f%%" title="%3$d %4$s"> %s</span>',
                                        $g, $_/$most*100, $_,
@@ -169,7 +170,8 @@ for my $inc (@incs) {
                        say '</span>';
                }
                print "\t<td class=ni>";
-               print join ' ', map { $caticon{$_} // () } split m{/}, $table->{category} // '';
+               print join ' ', map { $caticon{$_} // () }
+                       split m{/}, $table->{category} // '';
                say '';
                if (my $keys = eval {
                        my $keydata = Data("$dirbase/$inc.eng");