MarkdownRender
MarkdownRender copied to clipboard
Either output a `NewLine` *before* output (in addition to after) or *don't* output one.
-
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. -
Proposed technical implementation details (optional)
Don't emit a
[Environment]::NewLine
prepended to the output, or at the least, prepend one. -
Additional Information
-
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.
-
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
-