EditorSyntax icon indicating copy to clipboard operation
EditorSyntax copied to clipboard

Variables with curly braces are not highlighted correctly

Open alexr00 opened this issue 3 months ago • 2 comments

Prerequisites

  • [x] Write a descriptive title.
  • [x] Make sure you are able to repro it on the latest version
  • [x] Search the existing issues.

Steps to reproduce

The global:PROJ_ROOT should be highlighted the same on both lines, regardless of curly braces

${script:compile} = {
  ${global:PKG_BULD_DIR} = "$global:PROJ_ROOT\tmp\${PKG_NAME}\${PKG_PLATFORM}\${PKG_ARCH}"
  ${global:PKG_INST_DIR} = "${global:PROJ_ROOT}\out\${PKG_NAME}\${PKG_PLATFORM}\${PKG_ARCH}"
}

Originally from @valord577 in https://github.com/microsoft/vscode/issues/239461

Expected behavior

The global:PROJ_ROOT should be highlighted the same on both lines, regardless of curly braces

Actual behavior


Image

Error details


Environment data

N/A

Version

742f0b5d4b60f5930c0b47fcc1f646860521296e

Visuals

No response

Originally from @valord577 in https://github.com/microsoft/vscode/issues/239461

alexr00 avatar Nov 17 '25 12:11 alexr00

ok

robert2687 avatar Nov 17 '25 13:11 robert2687

Variables without curly braces are not highlighted correctly

That is backwards. The issue appears to be variables WITH braces inside of double-quote strings. The unbraced variable on line 2 is the same as the script:compile, global:PKG_BULD_DIR, and global:PKG_INST_DIR variables.

On Line 2, global is correctly marked as the variable storage scope. On line 3 it is marked as just a standard read/write variable.

omniomi avatar Nov 17 '25 19:11 omniomi