Skip to content

Powershell Parser can't tell the difference between En dash and dash #1308

Closed
@gbuktenica

Description

@gbuktenica

Issue Type: Bug

This issue will happen when code is copied from an external source such as the internet.

  1. Open VScode and create a new PowerShell File.
  2. Type the following: New-Item -Path $env:TEMP\hello1.txt [Press ENTER]
  3. Type the following: New-Item [Hold ALT]0150[Release ALT]Path $env:TEMP\hello2.txt
  4. Save the file and run in PowerShell
    Error returned:
At C:\Scripts\fail.ps1:2 char:12
+ New-Item –Path $env:TEMP\hello2.txt
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~
The string is missing the terminator: ".

Extension version: 1.7.0
VS Code version: Code 1.22.2 (3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9, 2018-04-12T16:38:45.278Z)
OS version: Windows_NT x64 10.0.15063

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz (4 x 2808)
Memory (System) 15.92GB (7.72GB free)
Process Argv C:\Program Files\Microsoft VS Code\Code.exe
Screen Reader no
VM 0%

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions