From: Fabien Potencier Date: Mon, 10 May 2010 15:21:55 +0000 (+0200) Subject: made a small optimization X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=6c4ce225b84bd0714a50801eec59f42c937896cb;p=web%2Fkonrad%2Ftwig.git made a small optimization --- diff --git a/lib/Twig/Lexer.php b/lib/Twig/Lexer.php index 7d0a85f..3fa314f 100644 --- a/lib/Twig/Lexer.php +++ b/lib/Twig/Lexer.php @@ -65,7 +65,7 @@ class Twig_Lexer implements Twig_LexerInterface 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;