Permalink
Browse files

Merge pull request #7 from garu/patch-1

unescaped braces in regex is deprecated in 5.17+
  • Loading branch information...
2 parents a1e815f + 00a77ab commit 02cffd44c3f4e729cfa0bde1db5a33c7fe39eaa5 @vti committed Jul 30, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Text/Haml.pm
View
@@ -889,11 +889,11 @@ sub _parse_text {
my $t;
my $escape = 0;
my $found = 0;
- if ($text =~ s/^(.*?)?(?<!\\)\#{//) {
+ if ($text =~ s/^(.*?)?(?<!\\)\#\{//) {
$found = 1;
$t = $1;
}
- elsif ($text =~ s/^(.*?)?\\\\\#{//) {
+ elsif ($text =~ s/^(.*?)?\\\\\#\{//) {
$found = 1;
$t = $1;
$escape = 1;
@@ -905,7 +905,7 @@ sub _parse_text {
}
if ($found) {
- $text =~ s/^([^}]+)}//;
+ $text =~ s/^([^}]+)\}//;
my $prefix = $escape ? quotemeta("\\") : '';
$output .= qq/$prefix".$1."/;

0 comments on commit 02cffd4

Please sign in to comment.