Cannot copy code block text

More precisely, the code block text copies wrong.

Bug 1: The text pastes into Notepad without line breaks.

Bug 2: The text pastes into Powershell with all the lines reversed!

Can provide screenshots if you don’t believe me :slight_smile:

I’m using the latest Chrome on Windows.

Example code block: https://powershell.org/forums/topic/default-sort-property/#post-84916 (edit- linkified)

I don’t face this problem, I tried in Internet Explorer and Edge(I don’t use any other browsers).

Can you try “Open Code in new window” option(the middle one) and copy.

Tested - Neither issue appears when using the separate window button.

This is partially a bug with the right-click paste in PS itself, as well. If you use Ctrl+V to paste instead, I believe the issue disappears.

Tested - you are right as well.

I do hope the site gets fixed so that snippets can be shared more smoothly like other places.

Aye. I’m not sure exactly what causes it, but I’ve seen it when pasting from a few other websites as well. Something about the way it ends up getting shunted to the clipboard isn’t quite right.