allow math on negative number

This commit is contained in:
mohrt
2003-05-02 19:05:21 +00:00
parent b29b7f9025
commit 406a148673

View File

@@ -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: