Closed bjhijmans closed 1 year ago
The Regex for the IncludeCommenter should probably be improved to cover this.
If there's a Regex wizzard in the room I would be happy to accept a PR.
FYI: a blacklist for includes was added in release 1.1, this should enable you to have comments break code in some of these very specific cases.
What happened?
I have the following include:
Due to the use of
__()
the IncludeCommenter broke the view compilation. In the compiled view I see:and I get the following syntax error:
It looks like it sees the closing parenthesis of the translation function and decided that was the end of the include. But it's not. Replacing the
__()
call with a plain string fixes the issue, confirming that that is indeed the cause.How to reproduce the bug
See above
Package Version
1.0.3
PHP Version
8.1.x
Laravel Version
10.13.0
Which operating systems does with happen with?
Linux
Notes
No response