vscode-blade-formatter
vscode-blade-formatter copied to clipboard
[Formatting Bug]:
Platform
Windows
Template before formatting
<table>
<tr>
<td>Number</td>
<td>Nom</td>
<td>prenom</td>
<td>Company</td>
<td>Ville</td>
<td>Salaire</td>
<td>Action</td>
</tr>
@foreach($data as $d)
<tr>
<td>{{$d->id}}</td>
<td>{{$d->Name}}</td>
<td>{{$d->Lastname}}</td>
<td>{{$d->Company}}</td>
<td>{{$d->Ville}}</td>
<td>{{$d->Salaire}}</td>
<td><button></button>
<button></button>
<button></button></td>
</tr>
@endforeach
</table>
Template after formatting
<table>
<tr>
<td>Number</td>
<td>Nom</td>
<td>prenom</td>
<td>Company</td>
<td>Ville</td>
<td>Salaire</td>
<td>Action</td>
</tr>
<?php
@foreach($data->$d)
<tr>
<td>{{$d->id}}</td>
<td>{{$d->Name}}</td>
<td>{{$d->Lastname}}</td>
<td>{{$d->Company}}</td>
<td>{{$d->Ville}}</td>
<td>{{$d->Salaire}}</td>
<td><button></button>
<button></button>
<button></button></td>
</tr>
@endforeach
?>
</table>
Expected Behaviour
the "php" bracket wasn't expected and the change from as to -> for some reason :/
Relevant log output
No response
Could not reproduced. I think other part of template or some option causes this.
$ ./bin/blade-formatter.js test.blade.php
<table>
<tr>
<td>Number</td>
<td>Nom</td>
<td>prenom</td>
<td>Company</td>
<td>Ville</td>
<td>Salaire</td>
<td>Action</td>
</tr>
@foreach ($data as $d)
<tr>
<td>{{ $d->id }}</td>
<td>{{ $d->Name }}</td>
<td>{{ $d->Lastname }}</td>
<td>{{ $d->Company }}</td>
<td>{{ $d->Ville }}</td>
<td>{{ $d->Salaire }}</td>
<td><button></button>
<button></button>
<button></button>
</td>
</tr>
@endforeach
</table>
Can you provide entire template? (please replace sensitive data)
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
this issue was caused by another extention it has nothing to do with this one.