Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Here-String does not work with tab/space #169

Closed
tonidy opened this issue May 10, 2016 · 2 comments
Closed

Here-String does not work with tab/space #169

tonidy opened this issue May 10, 2016 · 2 comments

Comments

@tonidy
Copy link

tonidy commented May 10, 2016

When I tried to write this:

<space> or <tab>$aTestVariable = @"
<space> or <tab>       Test 
<space> or <tab>       Satu
<space> or <tab>       Dua
<space> or <tab>       Tiga
<space> or <tab>"@

Then what I saw:
test

But this code works:

<space> or <tab>$aTestVariable = @"
<space> or <tab>       Test 
<space> or <tab>       Satu
<space> or <tab>       Dua
<space> or <tab>       Tiga
<empty space>"@

Is this by design? I could not find any information about this.

@rkeithhill
Copy link
Contributor

The accepted form of a here-string is:

@"<whitespace>*<newline>
<zero or more lines of text>
"@ 

The closing quotation mark must be the first character of a new line. See the help topic about_Quoting_Rules.

@daviwil
Copy link
Contributor

daviwil commented May 10, 2016

Yep, this is a facet of the PowerShell language rather than a VS Code extension bug. I'll close this, we can reopen if you feel that there's another issue here. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants