- bugfix plugin names starting with "php" did not compile https://github.com/smarty-php/smarty/issues/147

This commit is contained in:
uwetews
2015-12-30 22:11:15 +01:00
parent 34062d45b7
commit 7eb56ac5e3
4 changed files with 6 additions and 3 deletions

View File

@@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* smarty version
*/
const SMARTY_VERSION = '3.1.30-dev/12';
const SMARTY_VERSION = '3.1.30-dev/13';
/**
* define variable scopes

View File

@@ -287,7 +287,7 @@ class Smarty_Internal_Templatelexer
{
if (!isset($this->yy_global_pattern1)) {
$this->yy_global_pattern1 =
"/\G([{][}])|\G(" . $this->ldel . "[*])|\G((" . $this->ldel . "\\s*php(.*?)" . $this->rdel . ")|(" .
"/\G([{][}])|\G(" . $this->ldel . "[*])|\G((" . $this->ldel . "\\s*php([ ].*?)?" . $this->rdel . ")|(" .
$this->ldel . "\\s*[\/]php" . $this->rdel . "))|\G(" . $this->ldel . "\\s*literal\\s*" . $this->rdel .
")|\G(" . $this->ldel . "\\s*)|\G(\\s*" . $this->rdel .
")|\G((<[?]((php\\s+|=)|\\s+))|(<[%])|(<[?]xml\\s+)|(<script\\s+language\\s*=\\s*[\"']?\\s*php\\s*[\"']?\\s*>)|([?][>])|([%][>]))|\G([\S\s])/isS";