Stillat / blade-parser-typescript

A Laravel Blade parser, compiler, and static analyzer written in TypeScript.
https://stillat.com
MIT License
90 stars 3 forks source link

Indentation keeps increasing #96

Closed stayallive closed 8 months ago

stayallive commented 8 months ago

In my current blade files I have the following:

@section('content')
    <x-tw::page-header :breadcrumbs="[
                [
                    'title' => 'Shortener',
                ],
        ]">
@endsection

The problem is that every run of prettier the indentation if the inner array keeps increasing 😅

After about 5 runs I end up with:

    <x-tw::page-header
        :breadcrumbs="[
                                        [
                                            'title' => 'Shortener',
                                        ],
        ]"
    >

That is less than ideal obviously! As far as I know my syntax is working just fine but maybe multi-line attributes like that are a little unconventional.

JohnathonKoster commented 8 months ago

Thanks for the report! I've released 2.1.10 to address this issue

stayallive commented 8 months ago

🔥 that was very quick! Thanks, I've just confirmed and it's working beautiful!