Fix regression

This commit is contained in:
Fabien Potencier
2020-02-21 09:29:07 +01:00
parent 5d6d791454
commit 77e5846161
+2 -1
View File
@@ -506,8 +506,9 @@ class Lexer implements \Twig_LexerInterface
}
// an operator that begins with a character must have a space before
// or a parenthesis
if (ctype_alpha($operator[0])) {
$r = '(?<=\s)'.$r;
$r = '(?<=[\s(])'.$r;
}
// an operator with a space can be any amount of whitespaces