It seems that any sort of comment within tag attributes breaks things, to the point it errors out.
<div
x-data="{
@unless(config('filament-media-library.settings.show-upload-box-by-default'))
showUploadBox: false,
@endunless
}"
{{-- This event is dispatched from Livewire, so we need an event listener in addition to the global store. --}}
@unless(config('filament-media-library.settings.show-upload-box-by-default'))
x-on:toggle-upload-box.window="showUploadBox = ! showUploadBox"
@endunless
>
This doesn't format the Blade file at all from within PHP Storm. If I run prettier by hand on the command line ...
SyntaxError: Unexpected closing tag "div". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (349:1)
[error] 347 | </x-filament::modal>
[error] 348 | </div>
[error] > 349 | </div>
[error] | ^^^^^^
[error] 350 |
The divs are correctly closed. If I move that comment so it's outside the tag, everything works again. I've also tried HTML style comments, same thing.
It seems that any sort of comment within tag attributes breaks things, to the point it errors out.
This doesn't format the Blade file at all from within PHP Storm. If I run prettier by hand on the command line ...
The divs are correctly closed. If I move that comment so it's outside the tag, everything works again. I've also tried HTML style comments, same thing.