-
-
Couldn't load subscription status.
- Fork 6
Open
Description
I am loving this plugin so much. Thank you @JohnathonKoster for the amazing work ❤️❤️❤️.
I am hitting some edge cases where it adds unnecessary lines and if you keep formatting, it keeps on adding those lines and tabs repeatedly:
Simple Example:
Before Formatting<div
x-bind:style="() => {
@foreach ($secondaryFeatures as $index => $feature)
if (activeTab === @js($feature['name'])) {
return 'transform: translateX(-' + @js($index * 100) + '%)';
}
@endforeach
}"
></div> |
After Formatting<div
x-bind:style="() => {
@foreach ($secondaryFeatures as $index => $feature)
if (activeTab === @js($feature['name'])) {
return 'transform: translateX(-' + @js($index * 100) + '%)';
}
@endforeach
}"
></div> |
Complex Example:
This block of code gets formatted incorrectly, the plugin adds extra/unexpected lines. This could also be a result of incorrect configuration, I am not sure.
Before Formatting<div
x-bind:style="() => {
@php $index = 0; @endphp
@foreach ($secondaryFeatures as $feature)
if (activeTab === @js($feature['name'])) {
return 'transform: translateX(-' + @js($index * 100) + '%)';
}
@php $index++; @endphp
@endforeach
}"
></div>
|
After Formatting<div
x-bind:style="() => {
@php
$index = 0;
@endphp
@foreach ($secondaryFeatures as $feature)
if (activeTab === @js($feature['name'])) {
return 'transform: translateX(-' + @js($index * 100) + '%)';
}
@php
$index++;
@endphp
@endforeach
}"
></div>
|
NOTE: These are not made up examples 😁. I have extracted these examples from a codebase and tweaked a little to just demonstrate only the problematic part. Hope it helps.
Metadata
Metadata
Assignees
Labels
No labels