fix bug in new comment logic

This commit is contained in:
mohrt
2003-04-17 15:43:31 +00:00
parent e19bfe73a0
commit 9736393913

View File

@@ -240,12 +240,14 @@ class Smarty_Compiler extends Smarty {
/* Annihilate the comments. */ /* Annihilate the comments. */
$_comment_search = array( $_comment_search = array(
"!(\r|\r\n|\n)({$ldq})\*(.*?)\*({$rdq})(\r|\r\n|\n)!s", "!{$ldq}\*.*?\*{$rdq}!s", // get all onto one line
"!({$ldq})\*(.*?)\*({$rdq})!s"); "!(\r|\r\n|\n)%%%SMARTY_COMMENT%%%(\r|\r\n|\n)!", // remove CR if on one line
'!%%%SMARTY_COMMENT%%%!'); // remove remaining comments
$_comment_replace = array( $_comment_replace = array(
'%%%SMARTY_COMMENT%%%',
'\\1', '\\1',
''); '');
$template_source = preg_replace($_comment_search, $template_source = preg_replace($_comment_search,
$_comment_replace, $_comment_replace,
$template_source); $template_source);