Browse Source

Fixing multiline Blade comments, making closing comment tag required

Aaron Kuzemchak 12 years ago
parent
commit
3d7dc61697
1 changed files with 3 additions and 3 deletions
  1. 3 3
      laravel/blade.php

+ 3 - 3
laravel/blade.php

@@ -185,9 +185,9 @@ class Blade {
 	 */
 	protected static function compile_comments($value)
 	{
-		$value = preg_replace('/\{\{--(.+?)(--\}\})?\n/', "<?php // $1 ?>", $value);
-
-		return preg_replace('/\{\{--((.|\s)*?)--\}\}/', "<?php /* $1 */ ?>\n", $value);
+		$value = preg_replace('/\{\{--(.*?)--\}\}/', "<?php // $1 ?>", $value);
+		
+		return preg_replace('/\{\{--(.*?)--\}\}/s', "<?php /* ?>$1<?php */ ?>", $value);
 	}
 
 	/**