Skip to content

Variables with curly braces are not highlighted correctly #220

Description

@alexr00

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • 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 (@valord577) in microsoft/vscode#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

742f0b5

Visuals

No response

Originally from valord577 (@valord577) in microsoft/vscode#239461

Activity

  1. robert2687 commented on Nov 17, 2025

    @robert2687

    ok

  2. omniomi commented on Nov 17, 2025

    @omniomi
    Contributor

    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.

  3. changed the title [-]Variables without curly braces are not highlighted correctly[/-] [+]Variables with curly braces are not highlighted correctly[/+] on Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions