Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Curly braces inside HTML inside HEREDOC are marked red #455

Open
Nicero opened this issue Apr 27, 2022 · 0 comments
Open

Curly braces inside HTML inside HEREDOC are marked red #455

Nicero opened this issue Apr 27, 2022 · 0 comments

Comments

@Nicero
Copy link

Nicero commented Apr 27, 2022

Suppose to have an array (for example as a result from a dB query) such as:

$data = Array (
    "published" => "checked"
);

and want to use it inside HEREDOC:

$html = <<<HTML
        <input type="checkbox" name="published" {$data['published']}>
HTML;

the $data['published'] part will be marked red

Image 1

This does not happen if a similar part is preceded by a =" used for example with value="

$html = <<<HTML
        <input type="text" name="title" value="{$data['title']}">
HTML;

Image 2

VS Code: 1.66.2 (user setup)
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Data: 2022-04-11T07:46:01.075Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
Windows_NT x64 10.0.19042

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant