Skip to content

v2020.6.0 (preview) -  #2962

Closed
Closed
@ghost

Description

System Details

System Details Output

### VSCode version: 1.49.0 e790b931385d72cf5669fcefc51cdf65990efa5d x64

### VSCode extensions:
hashicorp.terraform@2.2.3
ms-python.python@2020.8.109390
ms-vscode.powershell@2020.6.0
rebornix.ruby@0.27.0
wingrunr21.vscode-ruby@0.27.0


### PSES version:

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      5.1.18362.752
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.18362.752
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

Format Document feature removes ": " (colon space) when beside a variable in a double quoted string. This occurs if the colon is escaped with the ` character, or, if the variable is wrapped in subexpression operator $().

Expected Behaviour

-- Description of what should be happening --

Nothing - escaping the character is valid, as is using a subexpression.

Actual Behaviour

-- Description of what actually happens --
Assuming the following two lines in code:
write-host "There is an issue doing the thing on $server`: $($_.exception.message)"
or
write-host "There is an issue doing the thing on $($server): $($_.exception.message)"

Format document removes the : characters, leaving:
write-host "There is an issue doing the thing on $server$($_.exception.message)"
or
write-host "There is an issue doing the thing on $($server)$($_.exception.message)"

Attached Logs

I'm not aware of any logging for this.

Follow the instructions in the troubleshooting docs
about capturing and sending logs.

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