Please feel free to provide feedback or file bugs here.

Allow whitespace between final newline and quotation mark in here-string

Votes from Connect: 10

Original Date Submitted: 12/10/2011 12:21:15 AM

Description:
********Contact Information********
Handle: JoshGav
Site Name: PowerShell
Feedback ID: 712796
***************************************

Frequency: Always Happens
Regression: Yes, this happens in previous released versions

Problem Description:
The final delimiter in a here-string is defined as newline-quotemarks-atsign. This means that the "@ has to be at the beginning of the final line, with no whitespace preceding it. This ruins attempts at tab indentation in scripts and functions. Whitespace should be allowed as part of the ending pattern between the newline and quotemarks so that tab indentation can be cleanly utilized.

Product Studio item created by Connect Synchronizer due to creation of feedback ID 712796 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=712796).

Repro Steps:
If a here-string is typed as follows:
$str = @"
a string
"@
it will not be evaluated properly.

Expected Results:
Allow the previously indicated string as a here-string, ignoring the extra whitespace between the final newline and ".

Internal BugId: 3186

13 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    AdminJoey Aiello [MSFT] (Program Manager, Windows Server) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base