Stillat / blade-parser-typescript

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

Trailing comma removed in match expression #31

Closed zepfietje closed 1 year ago

zepfietje commented 1 year ago

Input

<div
    {{
        match ($foo) {
            'foo' => 'foo',
            default => 'bar',
        }
    }}
></div>

Output

<div
    {{
        match ($foo) {
            'foo' => 'foo',
            default => 'bar'
        }
    }}
></div>

Would expect input to remain unchanged. Follow-up on the trailing commas issue that's partially been solved in https://github.com/Stillat/blade-parser-typescript/issues/27#issuecomment-1549914550.

zepfietje commented 1 year ago

Confirmed it works well in 1.1.10!