Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing multiline Blade comments, making closing comment tag required

  • Loading branch information...
commit 3d7dc61697ddfe4b64c0309a76a690514f08544a 1 parent d9802fe
@akuzemchak akuzemchak authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 laravel/blade.php
View
6 laravel/blade.php
@@ -185,9 +185,9 @@ protected static function extract($value, $expression)
*/
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);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.