diff --git a/src/Latte/Compiler/MacroTokens.php b/src/Latte/Compiler/MacroTokens.php index 9394f84d7..f4be32c16 100644 --- a/src/Latte/Compiler/MacroTokens.php +++ b/src/Latte/Compiler/MacroTokens.php @@ -50,7 +50,7 @@ public function parse($s) self::T_CAST => '\((?:expand|string|array|int|integer|float|bool|boolean|object)\)', // type casting self::T_VARIABLE => '\$[\w\pL_]+', self::T_NUMBER => '[+-]?[0-9]+(?:\.[0-9]+)?(?:e[0-9]+)?', - self::T_SYMBOL => '[\w\pL_]+(?:-[\w\pL_]+)*', + self::T_SYMBOL => '[\w\pL_]+(?:-+[\w\pL_]+)*', self::T_CHAR => '::|=>|->|\+\+|--|<<|>>|<=>|<=|>=|===|!==|==|!=|<>|&&|\|\||\?\?|\?>|\*\*|\.\.\.|[^"\']', // =>, any char except quotes ], 'u'); return self::$tokenizer->tokenize($s); diff --git a/tests/Latte/expected/macros.n-macros.html b/tests/Latte/expected/macros.n-macros.html index 27fd4a921..0eefa7857 100644 --- a/tests/Latte/expected/macros.n-macros.html +++ b/tests/Latte/expected/macros.n-macros.html @@ -14,7 +14,7 @@

n:class

n:class empty

- +

n:class with BEM