Skip to content

Commit

Permalink
@include adding extra space/line break to content laravel#27996
Browse files Browse the repository at this point in the history
code style fix
  • Loading branch information
bzixilu committed Apr 3, 2019
1 parent 8213fa7 commit 77f8b2d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Illuminate/View/Engines/PhpEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Illuminate\View\Engines;

use Exception;
use Illuminate\Support\Str;
use Throwable;
use Illuminate\Support\Str;
use Illuminate\Contracts\View\Engine;
use Symfony\Component\Debug\Exception\FatalThrowableError;

Expand Down Expand Up @@ -53,10 +53,11 @@ protected function evaluatePath($__path, $__data)
$ob_get_clean = ob_get_clean();
if ($count > 0) {
$last_line = $lines[$count - 1];
if (Str::startsWith($last_line, "<?php /*") && Str::endsWith($last_line, "*/ ?>")) {
$ob_get_clean = Str::replaceLast("\n", "", $ob_get_clean);
if (Str::startsWith($last_line, '<?php /*') && Str::endsWith($last_line, '*/ ?>')) {
$ob_get_clean = Str::replaceLast('\n', '', $ob_get_clean);
}
}

return ltrim($ob_get_clean);
}

Expand Down

0 comments on commit 77f8b2d

Please sign in to comment.