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

Break laravel string intepolation to new line line #106

Closed Lakshan-Madushanka closed 3 months ago

Lakshan-Madushanka commented 4 months ago

"My project, which previously worked as expected, broke after applying the blade-parser."

Consider below code:

before

<div 
     "@reply-deleted-{{ $comment->getKey() }}.window="
                  if($event.detail.commentId === {{ $comment->getKey() }}) {
                      replyCount -= 1;
                  }
     "
>
</div>

after

<div  
    "@reply-deleted
    -{{ $comment->getKey() }}.window="
                  if($event.detail.commentId === {{ $comment->getKey() }}) {
                      replyCount -= 1;
                  }
     "
>
</div>

Listeners never work as they are broken.

JohnathonKoster commented 3 months ago

Fix available in v2.1.17