spatie / laravel-blade-comments

Add debug comments to your rendered output
https://freek.dev/2500-a-laravel-package-to-quickly-see-which-html-is-rendered-by-which-blade-view
MIT License
150 stars 9 forks source link

fix: includes with data sometimes throw exceptions #20

Closed StyleShit closed 9 months ago

StyleShit commented 9 months ago

Closes #12

I think it should also be fixed in includeWhen & includeUnless, but I'm not sure why there is \n inside those two and if it should also be inside include and includeIf:

https://github.com/spatie/laravel-blade-comments/blob/b2a9f0382b3d71977390e22ae6434dfda81df41f/src/Commenters/BladeCommenters/IncludeUnlessCommenter.php#L16

IMHO, it might be better to also unify the logic somehow, so there won't be a need to fix 2 places each time.

WDYT?

freekmurze commented 9 months ago

Thanks!