Cannot copy code block text

Welcome Forums Web Site Feedback & Assistance Cannot copy code block text

This topic contains 5 replies, has 3 voices, and was last updated by

 
Participant
1 month, 2 weeks ago.

  • Author
    Posts
  • #114537

    Participant
    Points: 4
    Rank: Member

    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 🙂

    I'm using the latest Chrome on Windows.

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

  • #114582

    Participant
    Points: 885
    Helping Hand
    Rank: Major Contributor

    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.

  • #114793

    Participant
    Points: 4
    Rank: Member

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

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

  • #118128

    Participant
    Points: 292
    Helping Hand
    Rank: Contributor

    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.

    • #118686

      Participant
      Points: 4
      Rank: Member

      Tested – you are right as well.

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

    • #119995

      Participant
      Points: 292
      Helping Hand
      Rank: Contributor

      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.

       

You must be logged in to reply to this topic.