You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{-- Not Working --}}@loop ($itemsas$item)
{{$item}}@endloop@loopelse ($itemsas$item)
{{$item}}@loopempty
No items
@endloopelse@loop($itemsas$item)
{{$item}}@endloop@loopelse($itemsas$item)
{{$item}}@loopempty
No items
@endloopelse{{-- Working --}}@foreach ($itemsas$item)
{{$item}}@endforeach@forelse ($itemsas$item)
{{$item}}@empty
No items
@endforelse@foreach($itemsas$item)
{{$item}}@endforeach@forelse($itemsas$item)
{{$item}}@empty
No items
@endforelse
Template after formatting
{{-- Not Working --}}@loop ($itemsas$item)
{{$item}}@endloop@loopelse
($items as $item)
{{$item}}@loopempty
No items
@endloopelse@loop($itemsas$item)
{{$item}}@endloop@loopelse($itemsas$item)
{{$item}}@loopempty
No items
@endloopelse{{-- Working --}}@foreach ($itemsas$item)
{{$item}}@endforeach@forelse ($itemsas$item)
{{$item}}@empty
No items
@endforelse@foreach ($itemsas$item)
{{$item}}@endforeach@forelse($itemsas$item)
{{$item}}@empty
No items
@endforelse
Expected Behaviour
The input should remain unchanged.
@loop ($itemsas$item)
{{$item}}@endloop@loopelse ($itemsas$item)
{{$item}}@loopempty
No items
@endloopelse
When a custom directive has a space around the construct the formatter moves the construct onto a new line which causes a syntax error. It also doesn't correctly apply indentation inside of the custom directive.
It works perfectly fine for a @foreach.
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
@leettaylor
Thanks for creating the issue and your offer.
I think this behaviour should be fixed to allow one space around construct or delete space if it is not necessary.
It might be difficult to point where it should be fixed so I'll take a look around custom directive formatting section.
Version
1.41.1
Template before formatting
Template after formatting
Expected Behaviour
The input should remain unchanged.
When a custom directive has a space around the construct the formatter moves the construct onto a new line which causes a syntax error. It also doesn't correctly apply indentation inside of the custom directive.
It works perfectly fine for a
@foreach
.Relevant log output
No response
The text was updated successfully, but these errors were encountered: