blade-formatter icon indicating copy to clipboard operation
blade-formatter copied to clipboard

[Formatting Bug]: Error when formatting commented @if in @php block

Open blue-pitaya opened this issue 1 year ago • 0 comments

Version

1.41.0

Template before formatting

<div>
<p>Some normal HTML</p>
    @php
    //@if ($x)
    //@endif
    @endphp
</div>

Template after formatting

<div>
<p>Some normal HTML</p>
    @php
    //@if ($x)
    //@endif
    @endphp
</div>

Expected Behaviour

Formatter don't throw an error and align <p> tag properly.

Relevant log output

No response

The same problem occurs for commented @foreach block

blue-pitaya avatar Feb 22 '24 10:02 blue-pitaya