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

Formatter fails on `@` inside PHP comment #79

Closed zepfietje closed 1 year ago

zepfietje commented 1 year ago

Sometimes the formatter fails on @ inside a PHP comment. Have had to work around this here: https://github.com/filamentphp/filament/pull/8670/commits/3fdd068e30195e4130a49f4d8144cac0c1db5c3c.

This is the error output from before that fix commit:

packages/support/resources/views/components/dropdown/header.blade.php
[error] packages/support/resources/views/components/dropdown/header.blade.php: SyntaxError: Unexpected end of input while parsing echo
[error] 
[error]   10| ])
[error]   11| 
[error]   12| <{{ $tag }}
[error]  >13|     {{
[error]   14|         $attributes
[error]   15|             ->class([
[error]   16|                 'fi-dropdown-header flex w-full gap-2 p-3 text-sm',
JohnathonKoster commented 1 year ago

Thanks for letting me know! Resolved in 1.6.14 🙂

zepfietje commented 1 year ago

Perfect, thanks!