added blade comments and documentation.
This commit is contained in:
@@ -9,6 +9,7 @@ class Blade {
|
||||
*/
|
||||
protected static $compilers = array(
|
||||
'layouts',
|
||||
'comments',
|
||||
'echos',
|
||||
'forelse',
|
||||
'empty',
|
||||
@@ -152,6 +153,19 @@ class Blade {
|
||||
return str_replace(array("('", "')"), '', $matches[1]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rewrites Blade comments into PHP comments.
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
protected static function compile_comments($value)
|
||||
{
|
||||
$value = preg_replace('/\{\{--(.+?)(--\}\})?\n/', "<?php // $1 ?>", $value);
|
||||
|
||||
return preg_replace('/\{\{--((.|\s)*?)--\}\}/', "<?php /* $1 */ ?>\n", $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rewrites Blade echo statements into PHP echo statements.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user