From e0fc310b6e52d2246cf07fd800ac4a70252bc6c3 Mon Sep 17 00:00:00 2001 From: uwetews Date: Wed, 25 Nov 2015 21:19:23 +0100 Subject: -bugfix a left delimter like '[%' did fail on [%$var_[%$variable%]%] (forum topic 25798) --- lexer/smarty_internal_templatelexer.plex | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lexer/smarty_internal_templatelexer.plex') diff --git a/lexer/smarty_internal_templatelexer.plex b/lexer/smarty_internal_templatelexer.plex index cc05297e..721b528c 100644 --- a/lexer/smarty_internal_templatelexer.plex +++ b/lexer/smarty_internal_templatelexer.plex @@ -436,7 +436,15 @@ class Smarty_Internal_Templatelexer $this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->yypopstate(); } - double_quote { + ldel { + if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { + $this->token = Smarty_Internal_Templateparser::TP_TEXT; + } else { + $this->yypushstate(self::TAG); + return true; + } + } + double_quote { $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypushstate(self::DOUBLEQUOTEDSTRING); } @@ -569,14 +577,6 @@ class Smarty_Internal_Templatelexer space { $this->token = Smarty_Internal_Templateparser::TP_SPACE; } - ldel { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { - $this->token = Smarty_Internal_Templateparser::TP_TEXT; - } else { - $this->yypushstate(self::TAG); - return true; - } - } text { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } -- cgit v1.3