fixed typos in unicode goodie

master
Dylan Lloyd 2012-05-18 16:05:21 -04:00
parent 5f4d1419cf
commit bf6bea7607
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ use Encode qw/encode_utf8/;
use constant {
CODEPOINT_RE => qr/^ \s* U \+ (?<codepoint> [a-f0-9]{4,6}) \s* $/xi,
NAME_RE => qr/^ (?<name> [A-Z][A-Z\s]+) $/xi,
CHAR_RE => qr/^ \s* (?<char> .) \s* $}x,
CHAR_RE => qr/^ \s* (?<char> .) \s* $/x,
UNICODE_RE => qr/^ unicode \s+ (.+) $/xi,
CODEPOINT => 1,
NAME => 2,
@ -33,7 +33,7 @@ handle sub {
}
return codepoint_description($term);
}
};
sub codepoint_description {
my $term = $_[0];

View File

@ -23,7 +23,7 @@ ddg_goodie_test(
# Lookup by name, "unicode LATIN SMALL LETTER A WITH CIRCUMFLEX")
ddg_goodie_test(
[qw(DDG::Goodie::Unicode)],
"unicode White Smiling Face" => test_zci("\x{263A} U+263A BLACK SMILING FACE, decimal: 9786, HTML: &#9786;, UTF-8: 0xE2 0x98 0xBA, block: Miscellaneous Symbols"),
"unicode White Smiling Face" => test_zci("\x{263A} U+263A WHITE SMILING FACE, decimal: 9786, HTML: &#9786;, UTF-8: 0xE2 0x98 0xBA, block: Miscellaneous Symbols"),
);
# Lookup by character, "unicode à"