summaryrefslogtreecommitdiff
path: root/lexer/smarty_internal_templatelexer.plex
diff options
context:
space:
mode:
authoruwetews <uwe.tews@googlemail.com>2015-11-25 21:19:23 +0100
committeruwetews <uwe.tews@googlemail.com>2015-11-25 21:19:23 +0100
commite0fc310b6e52d2246cf07fd800ac4a70252bc6c3 (patch)
treef38cfa9196a7f167a55a2d0ff73d57e41947746b /lexer/smarty_internal_templatelexer.plex
parent5ca1cd485f98af16acc3792842ba259b5ccaf885 (diff)
downloadsmarty-e0fc310b6e52d2246cf07fd800ac4a70252bc6c3.tar.gz
smarty-e0fc310b6e52d2246cf07fd800ac4a70252bc6c3.tar.bz2
smarty-e0fc310b6e52d2246cf07fd800ac4a70252bc6c3.zip
-bugfix a left delimter like '[%' did fail on [%$var_[%$variable%]%] (forum topic 25798)
Diffstat (limited to 'lexer/smarty_internal_templatelexer.plex')
-rw-r--r--lexer/smarty_internal_templatelexer.plex18
1 files changed, 9 insertions, 9 deletions
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;
}