Remove html_enc from Regexp (#3600)
parent
94b217af1a
commit
a3fecac876
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue