Skip to content

Commit

Permalink
small optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 16, 2013
1 parent 793c6c2 commit 1db8ba8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Mojo/Util.pm
Expand Up @@ -354,8 +354,7 @@ sub _decode {
my ($point, $name) = @_;

# Code point
return substr($point, 0, 1) eq 'x' ? chr(hex $point) : chr($point)
unless defined $name;
return chr($point !~ /^x/ ? $point : hex $point) unless defined $name;

# Find entity name
my $rest = '';
Expand Down

0 comments on commit 1db8ba8

Please sign in to comment.