From f1614fb2f16c1e75c8dcef8a9d3e1e46cc236bee Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 18 Oct 2009 14:28:51 +0000 Subject: [PATCH] cc: improve abbreviations; show options legend --- base.css | 2 +- cc.plp | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/base.css b/base.css index bfce8a2..b566045 100644 --- a/base.css +++ b/base.css @@ -305,7 +305,7 @@ td.Mn {background: #ACC} /* modifier */ 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.Co {background: #DCC} /* private */ td.Xi, td.Cs {background: #CCC} /* invalid */ td.Xd {color: #844} /* deprecated */ td.Xr {color: #888} /* reserved (digraph reverse or proposal) */ diff --git a/cc.plp b/cc.plp index b36d744..afd10ed 100644 --- a/cc.plp +++ b/cc.plp @@ -42,7 +42,7 @@ sub quote { printf ''; print ''; for my $section (qw{thead}) { - print "<$section>
↱"; + print "<$section>
↳"; print '', $_ for 'a' .. 'z'; print "\n"; } @@ -69,13 +69,13 @@ sub quote { s/ republic\b//gi; s/ islands?\b//gi; s/\bthe //g; - s/ and / & /g; + s/ and / & /g and s/(?<=.)[a-z ]+//g; s/\bsaint /st /gi; - s/South /S-/g; - s/North /N-/g; + s/South(?:ern)? /S-/g; + s/North(?:ern)? /N-/g; s/New /n./g; s/(\S)(\S+)-/$1-/g; # strip most chars preceding dash - s/(\S{4}[b-df-hj-np-tv-xz])(\S{2,})/$1./g; # abbreviate (at consonant) + s/(\S{4}[b-df-hj-np-tv-xz])(\w{2,})/$1./g; # abbreviate (at consonant) $_ = quote($_); } $name =~ s/([^,]*), (.*)/$2 $1/; @@ -102,6 +102,16 @@ sub quote { reserved user-assigned
+ +
+ +