cvs: smarty /libs Smarty_Compiler.class.php
| From: | Monte Ohrt | Date: | Fri, 02 May 2003 19:05:22 +0000 |
| Subject: | cvs: smarty /libs Smarty_Compiler.class.php | ||
| Groups: | php.smarty.cvs | ||
| Request: | Send a blank email to php-smarty-cvs+get-577@lists.php.net to get a copy of this message | ||
mohrt Fri May 2 15:05:22 2003 EDT
Modified files:
/smarty/libs Smarty_Compiler.class.php
Log:
allow math on negative number
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.220 smarty/libs/Smarty_Compiler.class.php:1.221
--- smarty/libs/Smarty_Compiler.class.php:1.220 Fri May 2 12:39:18 2003
+++ smarty/libs/Smarty_Compiler.class.php Fri May 2 15:05:21 2003
@@ -39,7 +39,7 @@
* @package Smarty
*/
-/* $Id: Smarty_Compiler.class.php,v 1.220 2003/05/02 16:39:18 mohrt Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.221 2003/05/02 19:05:21 mohrt Exp $ */
/**
* Template compiling class
* @package Smarty
@@ -112,7 +112,7 @@
// $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: