From 3d7dc61697ddfe4b64c0309a76a690514f08544a Mon Sep 17 00:00:00 2001 From: Aaron Kuzemchak Date: Mon, 4 Jun 2012 14:48:22 -0400 Subject: [PATCH 1/2] Fixing multiline Blade comments, making closing comment tag required --- laravel/blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/laravel/blade.php b/laravel/blade.php index c362d57b..1a895ab8 100644 --- a/laravel/blade.php +++ b/laravel/blade.php @@ -185,9 +185,9 @@ class Blade { */ protected static function compile_comments($value) { - $value = preg_replace('/\{\{--(.+?)(--\}\})?\n/', "", $value); - - return preg_replace('/\{\{--((.|\s)*?)--\}\}/', "\n", $value); + $value = preg_replace('/\{\{--(.*?)--\}\}/', "", $value); + + return preg_replace('/\{\{--(.*?)--\}\}/s', "$1", $value); } /** From 75033f6287445d2bc10d779074511812363d96cc Mon Sep 17 00:00:00 2001 From: Aaron Kuzemchak Date: Mon, 4 Jun 2012 14:51:42 -0400 Subject: [PATCH 2/2] Updating docs for Blade comments --- laravel/documentation/views/templating.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/laravel/documentation/views/templating.md b/laravel/documentation/views/templating.md index 8849f0e1..c0d7b2fa 100644 --- a/laravel/documentation/views/templating.md +++ b/laravel/documentation/views/templating.md @@ -129,6 +129,12 @@ Blade makes writing your views pure bliss. To create a blade view, simply name y {{-- This is a comment --}} ... @endif + + {{-- + This is + a multi-line + comment. + --}} > **Note:** Blade comments, unlike HTML comments, are not visible in the HTML source.