td.Sc {background: #FCD} /* currency */
td.Sm {background: #ECE} /* math */
td.So {background: #DCF} /* symbol */
-td.Cf, td.Pd, td.Po {background: #CDF} /* punctuation */
+td.Pd, td.Po, td.Pc {background: #CDF} /* punctuation */
td.Ps, td.Pe, td.Pi, td.Pf {background: #BEF} /* quote */
td.Lm, td.Sk {background: #CEE} /* spacing modifier */
td.Mn {background: #ACC} /* modifier */
-td.Cc {color: #666; background: #BBB} /* control */
+td.Cc, td.Cf {color: #666; background: #BBB} /* control */
td.Zs {background: #ACB} /* space */
td.Zs span {background: #EEE}
td.Co {background: #A99} /* private */
td.Sc:hover {background: #F8C} /* currency */
td.Sm:hover {background: #F8F} /* math */
td.So:hover {background: #A8F} /* symbol */
-td.Cf:hover, td.Pd:hover, td.Po:hover {background: #8AF} /* punctuation */
+td.Pd:hover, td.Po:hover, td.Pc:hover {background: #8AF} /* punctuation */
td.Ps:hover, td.Pe:hover, td.Pi:hover, td.Pf:hover {background: #8DF} /* quote */
td.Lm:hover, td.Sk:hover {background: #BFF} /* spacing modifier */
td.Mn:hover {background: #CDE} /* modifier */
td.Zs:hover {background: #CED} /* space */
-td.Cc:hover {background: #DDD} /* control */
+td.Cc:hover, td.Cf:hover {background: #DDD} /* control */
td.Co:hover {background: #A77} /* private */
td.Xr:hover {background: #FFF} /* reserved */
td.Xa:hover {outline: 1px solid #0F0} /* ascii */
use strict;
use warnings;
+use utf8;
use open OUT => ':utf8', ':std';
use Data::Dumper;
if (-r 'shiar.inc.txt') {
open my $include, '<:utf8', 'shiar.inc.txt';
for (readline $include) {
- m{^([!"%'-Z_a-z]{2}) (.)} or next;
+ m{^(\$?[!"%'-Z_a-z]{2}) (.)} or next;
warn("$1 already defined"), next if defined $di{$1};
$di{$1} = ord $2;
push @extra, $1;
# show descriptive symbols instead of control chars themselves
$info{$_}->{string} = $di{$_} < 32 ? chr($di{$_} + 0x2400) : chr(0xFFFD);
}
+# presentational string for some control(lish) entries
+$info{$_}->{string} = '-' for grep { $di{$_} == 0x00AD } keys %di;
+$info{$_}->{string} = '→' for grep { $di{$_} == 0x200E } keys %di;
+$info{$_}->{string} = '←' for grep { $di{$_} == 0x200F } keys %di;
# convert info hashes into arrays of strings to output in display order
for my $row (values %info) {