Merge pull request #29 from Lauraly-com/templateChange

Change to prevent javascript single line object definition to be removed...
This commit is contained in:
Pep 2014-03-21 21:02:24 +01:00
commit f376f374b4
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ class Template {
$result = preg_replace('{<!--%(.+?)-->(.*?)<!--%%\\1-->}is', '', $this->templates[$id]);
// check for tpl variables that have not been replaced. ie: {name}. ignore literal stuff, though. ie: {{name}} is {name} and should not be removed
preg_match_all('~{?{(.+?)}}?~', $result, $matches);
preg_match_all('~{?{(\w+?)}}?~', $result, $matches);
foreach($matches[0] as $match) {
if (substr($match, 0, 2) == '{{') {