Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables that are built-in constants are not highlighted, like $Error and $PSVersionTable #218

Open
3 tasks done
o-l-a-v opened this issue Mar 17, 2024 · 0 comments
Open
3 tasks done
Assignees

Comments

@o-l-a-v
Copy link

o-l-a-v commented Mar 17, 2024

Prerequisites

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

Steps to reproduce

Noticed that both VSCode and GitHub doesn't highlight some variables, like $Error and $PSVersionTable

This:

```powershell
#Requires -Version 5.1
$SomeVariable
$Error
$PSVersionTable
string without quotes
'string with quotes'
```

Looks like this on GitHub:

#Requires -Version 5.1
$SomeVariable
$Error
$PSVersionTable
string without quotes
'string with quotes'
image

And in VSCode:

image

Expected behavior

Highlight.js demo https://highlightjs.org/demo does as I expect it to:

image

PowerShell ISE and the PowerShell terminal too:

image

Actual behavior

Steps to reproduce

Error details

No response

Environment data

PowerShell 7.4.1 x64 on Windows 11 23H2
VSCode 1.87.2, vscode-powershell v2024.0.0 and v2024.3.1-preview

Version

Latest?

Visuals

No response

@o-l-a-v o-l-a-v changed the title Some variables are not highlighted, like $Error and $PSVersionTable Variables that are built-in constants are not highlighted, like $Error and $PSVersionTable Mar 17, 2024
@andyleejordan andyleejordan self-assigned this Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants