"Continue" is highlighted as a statement/keyword when used as a parameter value

Open
#224 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Reproduce the issue in Visual Studio Code 1.117.0 with the PowerShell language selected, using a parameter value of "Continue". Trace the syntax-highlighting rules for parameter values and keyword recognition; done when "Continue" is highlighted like other parameter values without regressing keyword 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
  1. Create a new file in Visual Studio Code and select PowerShell as the language.
  2. Call a function/cmdlet where one of the parameter values is a keyword, e.g. "Continue".
Image
Expected behavior

Continue is highlighted in white, like other parameter values.

Actual behavior

Continue is highlighted in purple, likely meaning it is being recognized as the continue keyword.

Error details

No response

Environment data
Name                           Value
----                           -----
PSVersion                      7.6.1
PSEdition                      Core
GitCommitId                    7.6.1
OS                             Microsoft Windows 10.0.26200
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Version

Version used in Visual Studio Code 1.117.0

Visuals

No response

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.