Commit 7ae015c2 authored by Jason Rhinelander's avatar Jason Rhinelander
Browse files

Running with a literal character wasn't working (because of the last change to $arg)

parent 4d2950fb
......@@ -24,7 +24,7 @@ utf8::is_utf8($_) or utf8::decode($_) or die "Invalid input (not UTF-8): $_\n" f
my $arg = qr{
(
(?:0?x | [Uu]\+?)? [[:xdigit:]]+ (?:[_ ][[:xdigit:]]+)* # Hex, such as: 0x203d, x203d, 0x20_3d, etc. single _'s or spaces [which need to be shell escaped] allowed. Also allows the U+0123 system.
(?:0?x | U\+?)? [[:xdigit:]]+ (?:[_ ][[:xdigit:]]+)* # Hex, such as: 0x203d, x203d, 0x20_3d, etc. single _'s or spaces [which need to be shell escaped] allowed. Also allows the U+0123 system.
)
|
(
......@@ -248,7 +248,7 @@ sub bytes {
sub codepoint {
my $value = shift;
$value =~ /^$arg$/ or die "Cannot compute codepoint of `$value'";
my ($hex, $utf8_code, $bin, $chr) = ($1, $2, $3);
my ($hex, $utf8_code, $bin, $chr) = ($1, $2, $3, $4);
$hex =~ s/^(?:U\+?|0?x)//i if defined $hex;
if (defined $utf8_code) {
$utf8_code =~ s/.*\+//;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment