Open apih opened 1 month ago
Thanks for the report and code samples! I’ll take a look sometime this week 👍
John Koster
On Tue, Jul 9, 2024 at 4:23 AM Mohd Hafizuddin M Marzuki < @.***> wrote:
As per the sample, the lines in the @if statement will be indented to the right on every run. The weird thing is that it only happens to the first @if, but not the subsequent ones.
@section('head-mid')
@if ($form->picture !== '')- <meta property="og:image" content="{{ $form->picture_url }}" />- @endif+ <meta property="og:image" content="{{ $form->picture_url }}" />+ @endif <!-- Twitter's Card --> @if ($form->picture !== '') <meta property="twitter:image" content="{{ $form->picture_url }}" /> @endif
@endsection
— Reply to this email directly, view it on GitHub https://github.com/Stillat/blade-parser-typescript/issues/107, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABH5R6TBJUXAH7SWA4M3EPDZLOTZTAVCNFSM6AAAAABKSOOLUWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4TONRUGE4DMMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Apologize for the late follow up - I am unable to reproduce this. Is that the entire template, and could I also get your formatting config?
Thanks!
It was not the entire template, but I isolated that part into its own file, and the same behavior occurred.
My .blade.format.json
:
{
"useLaravelPint": true,
"classStrings": {
"enabled": false
},
"formatJsAttributes": false
}
My .prettierrc.json
:
{
"printWidth": 160,
"tabWidth": 4,
"trailingComma": "es5",
"singleQuote": true,
"plugins": [
"prettier-plugin-blade"
],
"overrides": [
{
"files": [
"*.blade.php"
],
"options": {
"parser": "blade",
"printWidth": 300
}
}
]
}
As per the sample, the lines in the
@if
statement will be indented to the right on every run. The weird thing is that it only happens to the first@if
, but not the subsequent ones.