countries: append alias target in flag mode
[sheet.git] / countries.plp
index b310a2fd69f3c9b9fe9954f4580722ac9b77554b..61a4795a688333b3b872e50153e36c929be43b70 100644 (file)
@@ -2,7 +2,7 @@
 
 Html({
        title => 'country code cheat sheet',
-       version => 'v1.0',
+       version => 'v1.1',
        description =>
                "Table of ISO-3166-1 country codes with the names of reserved territories.",
        keywords => [qw'country code cc tld cctld continent territory land table'],
@@ -33,6 +33,7 @@ my $cc = do 'countries.inc.pl';
                                next;
                        };
                        my ($name, $class, $short, $ref) = @$country;
+                       $name .= " → $ref" if $ref;
                        $ref ||= $code;
                        local $_ = $ref;
                        if (exists $get{show}) {
@@ -41,7 +42,6 @@ my $cc = do 'countries.inc.pl';
                        }
                        else {
                                $_ = EscapeHTML($short || $name);
-                               $name .= " → $ref" if $ref and $ref ne $code;
                        }
                        printf "\n".'<td class="%s" title="%s">%s',
                                $_ ? 'X '.$class : '', EscapeHTML("$code: $name"), $_;