PowerShell / PowerShell/vscode-powershell

PowerShell formatting and indent bug when using the backtick character

Open
#994 3 comments 2 reactions 1 assignee View on GitHub

@daviwil is already working on this.

Since Aug 14, 2017.

Area-Script Analysis
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

From @woowil on August 14, 2017 17:6

  • VSCode Version: Code 1.15.0 (8b95971d8cccd3afd86b35d4a0e098c189294ff2, 2017-08-09T20:16:06.988Z)
  • OS Version: Windows_NT ia32 10.0.14393
  • Extensions: the listing length exceeds browsers' URL characters limit

Steps to Reproduce:

  1. PowerShell
    Settings.json:
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
Desired Formatting:
Get-Process |  ForEach-Object `
   -Begin {
      $Count = 0
   } `
   -Process {
      $Count++
   } `
   -End {
      $Count
   }
Bug Formatting
Get-Process |  ForEach-Object `
   -Begin {
    $Count = 0
} `
    -Process {
    $Count++
} `
    -End {
    $Count
}

Reproduces without extensions: Yes/No

Copied from original issue: Microsoft/vscode#32494

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.