bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.61k stars 94 forks source link

Misleading syntax highlighting for string interpolation with braces #2935

Closed TimWolla closed 3 months ago

TimWolla commented 3 months ago

Describe the bug

When using the {$variable} string interpolation syntax, the braces are not highlighted, despite being part of the placeholder and not being printed.

To Reproduce

<?php

$foo = "foo";

echo "{$foo}bar";

Note that { and }bar is highlighted the same and only $foo is highlighted differently.

Expected behavior

The {$foo} is highlighted differently from the bar.

Screenshots

image

Platform and version

Version: 1.90.1
Commit: 611f9bfce64f25108829dd295f54a6894e87339d
Date: 2024-06-11T21:02:43.666Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 5.4.0-189-generic

with Intelephense v1.10.4 and also v1.11.4 (pre-release).

bmewburn commented 3 months ago

Thanks, it's coming from vscode in this case via https://github.com/KapitanOczywisty/language-php , but will keep this in mind when implementing #1021