MarkdownRender icon indicating copy to clipboard operation
MarkdownRender copied to clipboard

Either output a `NewLine` *before* output (in addition to after) or *don't* output one.

Open RokeJulianLockhart opened this issue 10 months ago • 0 comments

  1. Summary of the new feature / enhancement

    Like https://github.com/PowerShell/PowerShell/issues/14444#issue-769208193:~:text=Summary%20of%20the,newline%20was%20appended explains, Show-Markdown appears to output an unnecessary [Environment]::NewLine after invocation, which makes it difficult to read (because it doesn't even use one before the output too). https://github.com/MicrosoftDocs/PowerShell-Docs/blob/6ff8e52c11aabb6ea5724a6bd2952adfb6f2df12/reference/7.5/Microsoft.PowerShell.Utility/Show-Markdown.md#syntax doesn't list a way to disable this.

  2. Proposed technical implementation details (optional)

    Don't emit a [Environment]::NewLine prepended to the output, or at the least, prepend one.

  3. Additional Information

    1. Reported here due to https://github.com/PowerShell/MarkdownRender/blob/d26903f1ba6efda8912662794977b4b718b5f68e/README.md?plain=1#L4:~:text=the%20component%20is%20used%20by%20%60show-markdown%60.

    2. I've tested this on:

      sudo snap install $(what-snap 'JSNnoJl3EqkMuWoy5Dgq8PMqZ0uNcpie' | awk '{print $2}') --classic --channel=latest/stable --revision 264 # https://forum.snapcraft.io/t/can-i-install-a-package-using-its-snap-id/39053/4?u=beedellrokejulianloc
      

RokeJulianLockhart avatar Apr 13 '24 16:04 RokeJulianLockhart