question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reindent lines breaks here strings

See original GitHub issue

System Details

  • Operating system name and version: Windows Server 2016
  • VS Code version: 1.15.0-insider
  • PowerShell extension version: 1.4.1
  • Output from $PSVersionTable:
Name                           Value
----                           -----
PSVersion                      5.1.14409.1012
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.1012
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

Reindent Lines breaks here-strings

After running Reindent Lines:

function get-test 
{
        write-host @"
        something    
        "@
}

This breaks there here-string as white space is not allowed before the string terminator (which the syntax highlighter correctly points out). Also you do not usually want additional white space added in the middle of a literal string. Possibly related to #961

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Eisen-Hardtcommented, Mar 14, 2019
1reaction
TylerLeonhardtcommented, Mar 14, 2019

@Eisen-Hardt the ability for "@ to have spaces/tabs in front of it would actually be a PowerShell feature.

Can you open an issue here?

Today, a script wont work properly with anything in front of the closing here string ("@)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Powershell indent here-string
Does anybody know if it is possible to intend a here-string . Actually I've to write: $someString = @" First line second line...
Read more >
Markdown Syntax Documentation
Paragraphs and Line Breaks; Headers; Blockquotes ... A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's ...
Read more >
Reformat and rearrange code | PhpStorm Documentation
Do not keep line breaks: reformat line breaks according to the code style settings. This option overrides the Keep when reformatting | Line ......
Read more >
Strings
Line breaks within the string are interpreted as literal line breaks. Single-quoted strings can't interpolate values. Escape sequences. The following escape ...
Read more >
Google Java Style Guide
This document serves as the complete definition of Google's coding ... For example, there is no line break after the brace if it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found