From 3239a194359d0579deac5aba5e060e248fec3ef0 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Sat, 27 Jun 2015 15:35:27 +0200 Subject: - bugfix resolve naming conflict between custom Smarty delimiter '<%' and PHP ASP tags https://github.com/smarty-php/smarty/issues/64 --- lexer/smarty_internal_templatelexer.plex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lexer/smarty_internal_templatelexer.plex') diff --git a/lexer/smarty_internal_templatelexer.plex b/lexer/smarty_internal_templatelexer.plex index e36df597..a74c4038 100644 --- a/lexer/smarty_internal_templatelexer.plex +++ b/lexer/smarty_internal_templatelexer.plex @@ -331,10 +331,6 @@ class Smarty_Internal_Templatelexer $this->value = substr($this->data,$this->counter,$to-$this->counter); return false; } - phpstart { - $obj = new Smarty_Internal_Compile_Private_Php(); - $obj->parsePhp($this); - } ldel literal rdel { 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; @@ -354,6 +350,10 @@ class Smarty_Internal_Templatelexer rdel { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } + phpstart { + $obj = new Smarty_Internal_Compile_Private_Php(); + $obj->parsePhp($this); + } text { $to = strlen($this->data); preg_match("~($this->ldel)|([<]script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*[>])|([<][?])|([<][%])|([?][>])|([%][>])~i",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); -- cgit v1.3