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

`@php` content inside `@if` removed #15

Closed zepfietje closed 1 year ago

zepfietje commented 1 year ago

Input:

@if ('foo')
    @php
        $foo = 'foo';
    @endphp
@endif

Output:

@if ('foo')
    @php
    @endphp
@endif

Expected input to remain unchanged.

Also happens for same content inside @elseif. Found it doesn't happen when simply true or false is passed as the condition.

JohnathonKoster commented 1 year ago

This bug has been fixed in 1.1.2 (also impacted verbatim) 🙂

zepfietje commented 1 year ago

Thanks!