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
Site Name: PowerShell
Feedback ID: 712796
Frequency: Always Happens
Regression: Yes, this happens in previous released versions
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).
If a here-string is typed as follows:
$str = @"
it will not be evaluated properly.
Allow the previously indicated string as a here-string, ignoring the extra whitespace between the final newline and ".
Internal BugId: 3186