Skip to content

When we paste powershell script in VS code, space is getting replaced by  #1628

@BipulRaman

Description

@BipulRaman

Issue Type: Bug

Step1: Copy a woking powershell script
Step2: When we paste powershell script in VS code, space is getting replaced by Â
Note: It is not visible in editor, but during run, error is being thrown as syntex error. This issue is observed specially code is copied from a ps1 file which is copied from one VM to another by putting into ZIP file. This issue is not observed when we paste it in Powershell ISE. I am sharing the sample script here:
https://gist.github.com/BipulRaman/eb598cfaa75d9b077f0e18ba021346a5

 will not be visible in the editor, but when you will run the script, you will see exception. I am not able to reproduce the issue repeatedly, but i have captured screenshot for the same code in two different editor. Please have a look on attached screenshots.
powershell ise
vs code

VS Code version: Code 1.29.1 (bc24f98b5f70467bc689abf41cc5550ca637088e, 2018-11-15T19:13:36.375Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz (8 x 2712)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.88GB (21.41GB free)
Process Argv D:\DevTest\Block.ps1
Screen Reader no
VM 0%
Extensions (10)
Extension Author (truncated) Version
xml Dot 2.3.2
Angular2 joh 7.0.1
python ms- 2018.11.0
cpptools ms- 0.20.1
csharp ms- 1.17.1
PowerShell ms- 1.9.0
typescript-javascript-grammar ms- 0.0.47
team ms- 1.144.1
debugger-for-chrome msj 4.11.1
LiveServer rit 5.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions