projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
79e5058
)
made a small optimization
author
Fabien Potencier
<fabien.potencier@gmail.com>
Mon, 10 May 2010 15:21:55 +0000 (17:21 +0200)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Mon, 10 May 2010 15:21:55 +0000 (17:21 +0200)
lib/Twig/Lexer.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Lexer.php
b/lib/Twig/Lexer.php
index
7d0a85f
..
3fa314f
100644
(file)
--- 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;