add % to math

This commit is contained in:
mohrt
2003-05-05 18:36:11 +00:00
parent 2d245d5d8f
commit 2af5e72a7c

View File

@@ -112,7 +112,7 @@ class Smarty_Compiler extends Smarty {
// $foo[5][blah]
// $foo[5].bar[$foobar][4]
$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;
// matches config vars: