X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/28151a28db84c6d6018232f36c0003ecd562b3f0..f63a57e71a3aed6fe5e80ca979186e3bd6c7eb6b:/cc.plp diff --git a/cc.plp b/cc.plp index 8473241..e2d4f99 100644 --- a/cc.plp +++ b/cc.plp @@ -3,11 +3,13 @@ :> - + country code cheat sheet + + <:= stylesheet(qw'light dark mono red') :> @@ -17,14 +19,6 @@ <: my $cc = do 'cc.inc.pl'; -sub quote { - local $_ = shift; - s/"/"/g; - s//>/g; - return $_; -} - { printf ''; print ''; @@ -62,12 +56,12 @@ sub quote { 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])(\w{2,})/$1./g; # abbreviate (at consonant) - $_ = quote($_); + s/(\S{4}[b-df-hj-np-tv-xz])((?%s', - $_ ? 'X '.$class : '', quote("$code: $name"), $_; + $_ ? 'X '.$class : '', EscapeHTML("$code: $name"), $_; } print "\n"; }