diff --git a/laravel/blade.php b/laravel/blade.php index a0c7b178..69d94128 100644 --- a/laravel/blade.php +++ b/laravel/blade.php @@ -186,9 +186,9 @@ class Blade { */ protected static function compile_comments($value) { - $value = preg_replace('/\{\{--(.+?)(--\}\})?\n/s', "", $value); - - return preg_replace('/\{\{--((.|\s)*?)--\}\}/s', "\n", $value); + $value = preg_replace('/\{\{--(.*?)--\}\}/', "", $value); + + return preg_replace('/\{\{--(.*?)--\}\}/s', "$1", $value); } /** diff --git a/laravel/documentation/views/templating.md b/laravel/documentation/views/templating.md index d9756e26..d241810e 100644 --- a/laravel/documentation/views/templating.md +++ b/laravel/documentation/views/templating.md @@ -132,6 +132,12 @@ Similarly, you can use **@render**, which behaves the same as **@include** excep {{-- This is a comment --}} ... @endif + + {{-- + This is + a multi-line + comment. + --}} > **Note:** Blade comments, unlike HTML comments, are not visible in the HTML source.