Reindent lines breaks here strings
See original GitHub issueSystem 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:
- Created 6 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks like there is one open already. https://github.com/PowerShell/PowerShell/issues/2337#issue-178501482
@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 (
"@
)