Conversation
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
Since C# got this I believe we need follow C#. |
|
@iSazonov PowerShell is not C#. We can take all the good parts from C# but there's no need to take the bad parts as well. The C# docs for raw strings mention this:
why would we want to add the same limitation here if we can avoid it? |
|
Since this was not in C# but is now, it will raise questions for users. That is why it should be discussed. |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@MartinGC94 Sorry for the delay on responding. The Engine WG discussed this PR briefly in our last meeting, and we agreed that this would be a nice improvement to have. However, since it's a language change, an RFC would be required along with this PR. Can you please submit an RFC about this topic to the https://github.com/PowerShell/PowerShell-RFC repo? Thanks! |
|
@daxian-dbw Done. See: PowerShell/PowerShell-RFC#343 |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
Trim spaces based on the footer line, rather than the shortest line. Remove single line here string support
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
PR Summary
This updates the here string syntax to support a variable amount of quote characters in the header, which determines what the footer should look like. This enables the user to write nested here strings like so:
Additionally, adding 2 or more quotes to the here string header enables the user to indent the footer like this:
The indentation of the footer determines which column the lines start at. For example, in the previous example the content of the here string is
Hello Worldand notHello Worldbecause both the footer and the text is indented by 4 spaces.For more details see the related RFC : PowerShell/PowerShell-RFC#343 or the linked issue.
PR Context
Fixes #2337
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).