shufo / prettier-plugin-blade

Format your blade template using Prettier
https://www.npmjs.com/package/@shufo/prettier-plugin-blade
MIT License
317 stars 8 forks source link

[Formatting Bug]: @php block messed up inside tag #278

Closed calebdw closed 4 weeks ago

calebdw commented 3 months ago

Version

1.14.1

Template before formatting

<div
    @php
        $attributes = $attributes->filter(fn($_, $key) => !str($key)->startsWith(['x-model', 'wire:model', 'class', 'id']));
    @endphp
>
</div>

Template after formatting

<div
    @php
$attributes = $attributes->filter(fn($_, $key) => !str($key)->startsWith(['x-model', 'wire:model', 'class', 'id'])); @endphp
>
</div>

Expected Behaviour

It should not change the formatting

Relevant log output

No response

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days