Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-60316

Pasting code from the Code Block Macro in edit mode removes line break

    XMLWordPrintable

Details

    Description

      Issue Summary

      If you copy code from the Code Block Macro in edit mode into any plain text editor, the code loses the line breaks. This effectively removes all code indentation.

      Steps to Reproduce

      1. Copy any code from the code block macro in edit mode by selecting the code and copy via CTRL+C/CMD+C
      2. Paste the copied copy in a plain text editor or web page.

      Expected Results

      The copied code is pasted maintaining the indentation of the code.

      Actual Results

      All the line breaks are removed from the code, subsequently removing all code indentation. Attaching the screen recording for the same.

      Codeblock copypaste.mov

      Workaround

      • Click on the Code Block macro frame and then hit CTRL/CMD+C the newlines are retained when pasting the text elsewhere.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aansari@atlassian.com Aamir (Inactive)
              Votes:
              6 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: