@" "@ for multiline string makes all following lines color syntax wrong
ksipple opened this issue · comments
when I am defining multiline strings the first @ makes all the following lines color look like it is in "quotes"
the second @ should cancel the first out
example:
$myString = @"
This is the first line
This the second line
This is the third line
"@
Thanks for this! i'll take a deeper look into this.
I guess it only happens when I do this:
$myString = @"
This is the first line
This the second line
This is the third line"@
Write-Host Building web resources... -NoNewLine
npm install --quiet
[image: Inline image 1]
On Tue, Aug 18, 2015 at 11:13 AM, James Sconfitto notifications@github.com
wrote:
Yeah, i'm not seeing this either. Using:
$myString = @"This is the first lineThis the second lineThis is the third line"@
Write-Host Building web resources... -NoNewLine
npm install --quieti see the following:
[image: image]
https://cloud.githubusercontent.com/assets/238079/9333901/0dc65074-459a-11e5-8fbb-1eecec60d3f1.png—
Reply to this email directly or view it on GitHub
#43 (comment)
.
It's by design: the end of here-string must be "@
at the beginning of the line
https://technet.microsoft.com/en-us/library/ee692792.aspx?f=255&MSPPError=-2147217396
We want to assign our string value to a variable named $x; that’s why we started things off with $x = followed by @", the syntax that represents the start of our here-string. (Which, we should add, needs to be on a line all by itself.) We then indicate the end of the here-string by typing the construction "@, also on a line by itself.
Thanks for the clarification, @vors. Closing since this is by design.