From 6c4ce225b84bd0714a50801eec59f42c937896cb Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 10 May 2010 17:21:55 +0200 Subject: [PATCH] made a small optimization --- lib/Twig/Lexer.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; -- 1.7.2.5