cvs: smarty / NEWS /libs Smarty_Compiler.class.php
| From: | Monte Ohrt | Date: | Sat, 26 Apr 2003 15:56:27 +0000 |
| Subject: | cvs: smarty / NEWS /libs Smarty_Compiler.class.php | ||
| Groups: | php.smarty.cvs | ||
| Request: | Send a blank email to php-smarty-cvs+get-563@lists.php.net to get a copy of this message | ||
mohrt Sat Apr 26 11:56:27 2003 EDT
Modified files:
/smarty NEWS
/smarty/libs Smarty_Compiler.class.php
Log:
remove unnecessary close/open tags from compiled templates
Index: smarty/NEWS
diff -u smarty/NEWS:1.351 smarty/NEWS:1.352
--- smarty/NEWS:1.351 Mon Apr 21 13:42:50 2003
+++ smarty/NEWS Sat Apr 26 11:56:11 2003
@@ -1,3 +1,5 @@
+ - remove unnecessary close/open tags from compiled templates
+ (Monte)
- fixed errornous creation of '//' in image_path in html_image (messju)
- fix escapement of special chars for key vals in debug
console (Monte)
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.216 smarty/libs/Smarty_Compiler.class.php:1.217
--- smarty/libs/Smarty_Compiler.class.php:1.216 Sun Apr 20 17:11:54 2003
+++ smarty/libs/Smarty_Compiler.class.php Sat Apr 26 11:56:18 2003
@@ -39,7 +39,7 @@
* @package Smarty
*/
-/* $Id: Smarty_Compiler.class.php,v 1.216 2003/04/20 21:11:54 cellog Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.217 2003/04/26 15:56:18 mohrt Exp $ */
/**
* Template compiling class
* @package Smarty
@@ -315,6 +315,9 @@
if ($template_compiled{strlen($template_compiled) - 1} == "\n" ) {
$template_compiled = substr($template_compiled, 0, -1);
}
+
+ // remove unnecessary close/open tags
+ $template_compiled = preg_replace('!\?>\n?<\?php!', '',
$template_compiled);
// run compiled template through postfilter functions
if (count($this->_plugins['postfilter']) > 0) {