PowerShell / EditorSyntax

PowerShell syntax highlighting for editors (VS Code, Atom, SublimeText, TextMate, etc.) and GitHub!
MIT License
133 stars 45 forks source link

Powershell syntax highlighting breaks on literal property containing variable #69

Closed aeschli closed 6 years ago

aeschli commented 6 years ago

From @jmeijrink on February 20, 2018 13:48

Issue Type

Bug

Description

Paste below script block in a window with powershell syntax highlighting:

$someVar."boe" Write-Host "Color coding is still correct"

$name = "boe" $someVar."$name" Write-Host "Color coding is broken by variable in literal property"

VS Code Info

VS Code version: Code - Insiders 1.21.0-insider (6309a7734b0b0876b263a6a9cb526fc281100089, 2018-02-20T10:24:00.306Z) OS version: Windows_NT x64 10.0.17074

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-4712HQ CPU @ 2.30GHz (8 x 2295)| |Memory (System)|15.91GB (6.00GB free)| |Process Argv|C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe| |Screen Reader|no| |VM|0%|
Extensions (4) Extension|Author (truncated)|Version ---|---|--- python|ms-|2018.1.0 PowerShell|ms-|1.5.1 team|ms-|1.122.0 vscode-docker|Pet|0.0.24

Reproduces only with extensions

image

Copied from original issue: Microsoft/vscode#44035

aeschli commented 6 years ago

I updated the Powershell to the latest from this repo. That means we are back to what we had in 1.20 and this bug no longer present.