cvs: smarty /libs Smarty_Compiler.class.php

From: Date: Fri, 23 May 2003 19:26:57 +0000
Subject: cvs: smarty /libs Smarty_Compiler.class.php
Groups: php.smarty.cvs 
Request: Send a blank email to php-smarty-cvs+get-610@lists.php.net to get a copy of this message
mohrt Fri May 23 15:26:57 2003 EDT Modified files: /smarty/libs Smarty_Compiler.class.php Log: allow spaces in literal tags Index: smarty/libs/Smarty_Compiler.class.php diff -u smarty/libs/Smarty_Compiler.class.php:1.230 smarty/libs/Smarty_Compiler.class.php:1.231 --- smarty/libs/Smarty_Compiler.class.php:1.230 Mon May 19 18:38:28 2003 +++ smarty/libs/Smarty_Compiler.class.php Fri May 23 15:26:57 2003 @@ -39,7 +39,7 @@ * @package Smarty */ -/* $Id: Smarty_Compiler.class.php,v 1.230 2003/05/19 22:38:28 mohrt Exp $ */ +/* $Id: Smarty_Compiler.class.php,v 1.231 2003/05/23 19:26:57 mohrt Exp $ */ /** * Template compiling class * @package Smarty @@ -248,9 +248,9 @@ $template_source); /* Pull out the literal blocks. */ - preg_match_all("!{$ldq}literal{$rdq}(.*?){$ldq}/literal{$rdq}!s", $template_source, $_match); + preg_match_all("!{$ldq}\s*literal\s*{$rdq}(.*?){$ldq}\s*/literal\s*{$rdq}!s", $template_source, $_match); $this->_literal_blocks = $_match[1]; - $template_source = preg_replace("!{$ldq}literal{$rdq}(.*?){$ldq}/literal{$rdq}!s", + $template_source = preg_replace("!{$ldq}\s*literal\s*{$rdq}(.*?){$ldq}\s*/literal\s*{$rdq}!s", $this->quote_replace($this->left_delimiter.'literal'.$this->right_delimiter), $template_source); /* Pull out the php code blocks. */ @@ -816,8 +816,8 @@ $_plugin_filepath = $this->_get_plugin_filepath('core', 'smarty_include'); $output .= "require_once('$_plugin_filepath');\nsmarty_core_smarty_include($_params, \$this);\n" . - "\$this->_tpl_vars = \$_smarty_tpl_vars;\n" . - "unset(\$_smarty_tpl_vars);\n"; + "\$this->_tpl_vars = \$_smarty_tpl_vars;\n" . + "unset(\$_smarty_tpl_vars);\n"; if (isset($assign_var)) { $output .= "\$this->assign(" . $assign_var . ", ob_get_contents()); ob_end_clean();\n";

« previous php.smarty.cvs (#610) next »