Remove html_enc from Regexp (#3600)

master
Gautam krishna.R 2016-09-05 15:31:47 +05:30 committed by Ben Moon
parent 94b217af1a
commit a3fecac876
1 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ sub compile_re {
# Using $& causes a performance penalty, apparently.
sub get_full_match {
return html_enc(substr(shift, $-[0], $+[0] - $-[0]));
return substr(shift, $-[0], $+[0] - $-[0]);
}
# Ensures that the correct numbered matches are being produced.
@ -45,11 +45,11 @@ sub get_match_record {
my $matches = {};
$matches->{'Full Match'} = get_full_match($str);
foreach my $match (keys %+) {
$matches->{"Named Capture <$match>"} = html_enc($+{$match});
$matches->{"Named Capture <$match>"} = $+{$match};
};
my $i = 1;
foreach my $match (@numbered) {
$matches->{"Subpattern Match $i"} = html_enc($match);
$matches->{"Subpattern Match $i"} = $match;
$i++;
};
return $matches;