Variables with curly braces are not highlighted correctly

Open
#220 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
powershell
Domain
tooling

Research direction

Start by reproducing the PowerShell snippet in a supported editor and compare highlighting for global:PROJ_ROOT with and without curly braces. The payload names no source file or test; trace the syntax-highlighting rules and add regression coverage showing both forms receive the same highlighting.

Written by the indexing model from the issue text.

Description

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 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

Dominant language
PowerShell
Stars
151
Forks
55
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PowerShell/EditorSyntax

All issues in PowerShell/EditorSyntax

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.