Stillat / blade-parser-typescript

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

`match` indentation #54

Closed zepfietje closed 1 year ago

zepfietje commented 1 year ago

Ran into this issue (regression?) on the latest version (1.5.0).

Input and expected output:

<div
    {{
        $attributes->class([
            'foo',
            match ($foo) {
                'foo' => 'foo',
                'bar' => 'foo',
            },
        ])
    }}
></div>

Actual output:

<div
    {{
        $attributes->class([
            'foo',
            match ($foo) {
            'foo' => 'foo',
            'bar' => 'foo',
            },
        ])
    }}
></div>
JohnathonKoster commented 1 year ago

I'm not able to reproduce with the provided example (and took a look at the test suite and those existing ones are still passing). Would you be able to share more of the template, and the various formatting configurations that caused it?

Thanks!

zepfietje commented 1 year ago

Seems to have been a caching issue... Only still happened via the VS Code Prettier plugin, but restarting didn't solve it. Deleted node_modules and reinstalled, now it's working fine.

Sorry!