You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my optinion this is a bug because the PHP heredoc/nowdoc documentation says:
The closing identifier may be indented by space or tab, in which case the indentation will be stripped from all lines in the doc string. Prior to PHP 7.3.0, the closing identifier must begin in the first column of the line.
Activity
mikebronner commentedon Dec 18, 2024
what happens if you do the heredoc without quotes:
N1ebieski commentedon Dec 18, 2024
The same:
N1ebieski commentedon Feb 24, 2025
Heredocs are still not working in the "stable" 1.0.0 version :(
N1ebieski commentedon Mar 2, 2025
Ok I found it. The problem is the end parameter for all of the heredoc_interior/nowdoc_interior patterns in the blade.tmLanguage.json.
There is a caret (start of string) in the regex:
"end": "^(\\2)\\b"
so any code in the heredoc/nowdoc in the blade files must have closing tag without any spaces/tabs before:
For example:
instead:
In my optinion this is a bug because the PHP heredoc/nowdoc documentation says:
https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc
I suggest changing the end parameter to:
"end": "^\\s*(\\2)\\b"
for all of the heredoc_interior/nowdoc_interior patterns