Skip to content

Commit

Permalink
made a small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed May 10, 2010
1 parent 79e5058 commit 6c4ce22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Twig/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function tokenize($code, $filename = 'n/a')
mb_internal_encoding('ASCII');
}

$this->code = preg_replace('/(\r\n|\r|\n)/', "\n", $code);
$this->code = str_replace(array("\r\n", "\r"), "\n", $code);
$this->filename = $filename;
$this->cursor = 0;
$this->lineno = 1;
Expand Down

0 comments on commit 6c4ce22

Please sign in to comment.