multiline echo and comments

for issue #647
This commit is contained in:
Tobsn 2012-07-25 00:21:32 +02:00
parent a04f38c262
commit 6cb2ddad64
1 changed files with 3 additions and 3 deletions

View File

@ -186,9 +186,9 @@ protected static function extract($value, $expression)
*/ */
protected static function compile_comments($value) protected static function compile_comments($value)
{ {
$value = preg_replace('/\{\{--(.+?)(--\}\})?\n/', "<?php // $1 ?>", $value); $value = preg_replace('/\{\{--(.+?)(--\}\})?\n/s', "<?php // $1 ?>", $value);
return preg_replace('/\{\{--((.|\s)*?)--\}\}/', "<?php /* $1 */ ?>\n", $value); return preg_replace('/\{\{--((.|\s)*?)--\}\}/s', "<?php /* $1 */ ?>\n", $value);
} }
/** /**
@ -199,7 +199,7 @@ protected static function compile_comments($value)
*/ */
protected static function compile_echos($value) protected static function compile_echos($value)
{ {
return preg_replace('/\{\{(.+?)\}\}/', '<?php echo $1; ?>', $value); return preg_replace('/\{\{(.+?)\}\}/s', '<?php echo $1; ?>', $value);
} }
/** /**