Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
another small optimization
  • Loading branch information
kraih committed Feb 19, 2013
1 parent 495937f commit 6c5b243
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/Mojo/Template.pm
Expand Up @@ -190,12 +190,7 @@ sub parse {
}

# Escaped line ending
if ($line =~ /(\\+)$/) {
length $1 > 1 ? ($line =~ s/\\\\$/\\\n/) : ($line =~ s/\\$//);
}

# Normal line ending
else { $line .= "\n" }
$line .= "\n" unless $line =~ s/\\\\$/\\\n/ || $line =~ s/\\$//;

# Mixed line
my @token;
Expand Down

0 comments on commit 6c5b243

Please sign in to comment.