Fix missing delimiter for preg_quote in lexer

This commit is contained in:
wait
2020-09-25 12:35:57 +03:00
committed by Fabien Potencier
parent 67eea1843b
commit 41605057a4
+1 -1
View File
@@ -117,7 +117,7 @@ class Lexer implements \Twig_LexerInterface
// #}
'lex_comment' => '{
(?:'.
preg_quote($this->options['whitespace_trim']).preg_quote($this->options['tag_comment'][1], '#').'\s*\n?'. // -#}\s*\n?
preg_quote($this->options['whitespace_trim'].$this->options['tag_comment'][1], '#').'\s*\n?'. // -#}\s*\n?
'|'.
preg_quote($this->options['whitespace_line_trim'].$this->options['tag_comment'][1], '#').'['.$this->options['whitespace_line_chars'].']*'. // ~#}[ \t\0\x0B]*
'|'.