mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
allow math on negative number
This commit is contained in:
@@ -112,7 +112,7 @@ class Smarty_Compiler extends Smarty {
|
|||||||
// $foo[5][blah]
|
// $foo[5][blah]
|
||||||
// $foo[5].bar[$foobar][4]
|
// $foo[5].bar[$foobar][4]
|
||||||
$this->_dvar_guts_regexp = '\w+(?:' . $this->_var_bracket_regexp
|
$this->_dvar_guts_regexp = '\w+(?:' . $this->_var_bracket_regexp
|
||||||
. ')*(?:\.\$?\w+(?:' . $this->_var_bracket_regexp . ')*)*(?:\+\+|\-\-|(?:[\+\-\*\/]\d+(?:\.\d+)?))?';
|
. ')*(?:\.\$?\w+(?:' . $this->_var_bracket_regexp . ')*)*(?:\+\+|\-\-|(?:[\+\-\*\/]\-?\d+(?:\.\d+)?))?';
|
||||||
$this->_dvar_regexp = '\$' . $this->_dvar_guts_regexp;
|
$this->_dvar_regexp = '\$' . $this->_dvar_guts_regexp;
|
||||||
|
|
||||||
// matches config vars:
|
// matches config vars:
|
||||||
|
Reference in New Issue
Block a user