mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
fix "if" regex for math tokens
This commit is contained in:
@@ -1084,7 +1084,7 @@ class Smarty_Compiler extends Smarty {
|
||||
preg_match_all('/(?>
|
||||
' . $this->_obj_call_regexp . '(?:' . $this->_mod_regexp . '*) | # valid object call
|
||||
' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*) | # var or quoted string
|
||||
\-?\d+|!==|<=>|==|!=|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|<|>|\||\% | # valid non-word token
|
||||
\-?\d+|!==|<=>|==|!=|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|<|>|\||\%|\+|\-|\/|\* | # valid non-word token
|
||||
\b\w+\b | # valid word token
|
||||
\S+ # anything else
|
||||
)/x', $tag_args, $match);
|
||||
|
@@ -1084,7 +1084,7 @@ class Smarty_Compiler extends Smarty {
|
||||
preg_match_all('/(?>
|
||||
' . $this->_obj_call_regexp . '(?:' . $this->_mod_regexp . '*) | # valid object call
|
||||
' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*) | # var or quoted string
|
||||
\-?\d+|!==|<=>|==|!=|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|<|>|\||\% | # valid non-word token
|
||||
\-?\d+|!==|<=>|==|!=|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|<|>|\||\%|\+|\-|\/|\* | # valid non-word token
|
||||
\b\w+\b | # valid word token
|
||||
\S+ # anything else
|
||||
)/x', $tag_args, $match);
|
||||
|
Reference in New Issue
Block a user