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

Unpaired condition control structure @section #113

Closed lucadegasperi closed 3 weeks ago

lucadegasperi commented 3 weeks ago

Hello,

I'm writing this issue to report that the section control structure with a second argument

@section('section-name', 'section-value')

should be considered as a self closing control structure and thus be valid instead I'm getting a Unpaired condition control structure error.

JohnathonKoster commented 3 weeks ago

Ah, good catch. I'll look into this sometime this week and get an update rolled out

lucadegasperi commented 3 weeks ago

Thank you!

JohnathonKoster commented 3 weeks ago

Do you have the rest of the template that was used to trigger the error? Trying to reproduce with simple templates on my end.

Thanks!

lucadegasperi commented 3 weeks ago

I believe the error might have been triggered by something else inside the file, because I no longer get the error right now after fixing other issues inside the file.

JohnathonKoster commented 3 weeks ago

Sounds good. If you are able to reproduce the error in a valid template (unclosed conditions and condition-likes will throw that error by design), feel free to reopen this issue. I'm going to close it for now, however