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

Code macro does not maintain empty lines when copy and pasted

      Not 100% sure this is a regression, it looks like we may have just overlooked this in the original ticket: https://jira.atlassian.com/browse/CONF-23564

      Verified this is occurring in Confluence 5.0.2 (CAC) when copying from JIRA logs viewed in Sublime Text 2.

      Copied:

      INFO: Starting Coyote AJP/1.3 on ajp-127.0.0.1-8509
      Mar 18, 2013 2:08:43 AM org.apache.catalina.startup.Catalina start
      INFO: Server startup in 255197 ms
      2013-03-18 02:09:00,359 Modification Check:thread-1 INFO      [atlassian.jira.startup.JiraStartupLogger] 
      
      ___ Modifications ___________________________
      
           Modified Files                                : jira-application.properties, seraph-config.xml
           Removed Files                                 : None
      
      Mar 18, 2013 2:12:48 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
      INFO: Initiating Jersey application, version 'Jersey: 1.8-atlassian-6 03/12/2012 02:59 PM'
      Mar 18, 2013 2:13:07 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
      INFO: Initiating Jersey application, version 'Jersey: 1.8-atlassian-6 03/12/2012 02:59 PM'
      

      Which turned into:

      INFO: Starting Coyote AJP/1.3 on ajp-127.0.0.1-8509
      Mar 18, 2013 2:08:43 AM org.apache.catalina.startup.Catalina start
      INFO: Server startup in 255197 ms
      2013-03-18 02:09:00,359 Modification Check:thread-1 INFO      [atlassian.jira.startup.JiraStartupLogger] 
      ___ Modifications ___________________________
           Modified Files                                : jira-application.properties, seraph-config.xml
           Removed Files                                 : None
      Mar 18, 2013 2:12:48 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
      INFO: Initiating Jersey application, version 'Jersey: 1.8-atlassian-6 03/12/2012 02:59 PM'
      Mar 18, 2013 2:13:07 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
      INFO: Initiating Jersey application, version 'Jersey: 1.8-atlassian-6 03/12/2012 02:59 PM'

      Copied from SublimeText into Chrome.

      Google Chrome	25.0.1364.172 (Official Build 187217) 
      OS	Mac OS X 
      WebKit	537.22 (@145275)
      JavaScript	V8 3.15.11.17
      Flash	11.6.602.180
      User Agent	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22
      Command Line	 /Applications/Google Chrome.app/Contents/MacOS/Google Chrome -psn_0_48807561 --flag-switches-begin --flag-switches-end
      

        1. Code-example.pdf
          356 kB
        2. code macro regression.swf
          1.98 MB

            [CONFSERVER-28582] Code macro does not maintain empty lines when copy and pasted

            Would it be possible to provide a solution also for version 5.8.xx?
            We have just updated our system to 5.8 and because of the size of our installation, it is that simple to update to major versions.
            The next big update is planned for the end of the year and it would be nice if could solve this problem a little bit earlier.

            ConfluenceE added a comment - Would it be possible to provide a solution also for version 5.8.xx? We have just updated our system to 5.8 and because of the size of our installation, it is that simple to update to major versions. The next big update is planned for the end of the year and it would be nice if could solve this problem a little bit earlier.

            The only workaround which works for me is if I use Insert Markup and paste my source code inside code tags there. Makes it annoying to update the source code (delete and recreate each time). Hope this is fixed very soon.

            roman_baeriswyl added a comment - The only workaround which works for me is if I use Insert Markup and paste my source code inside code tags there. Makes it annoying to update the source code (delete and recreate each time). Hope this is fixed very soon.

            It works in IE9 running in IE8 compatibility mode.

            Kevan Gelling added a comment - It works in IE9 running in IE8 compatibility mode.

            I have tried it successfully on IE 8. If it works for IE 8 and 11, why should it not work on IE 9? Maybe check the compatibility mode settings. (or use a better browser

            (Better browser: anything but IE)

            Hans-Peter Geier added a comment - I have tried it successfully on IE 8. If it works for IE 8 and 11, why should it not work on IE 9? Maybe check the compatibility mode settings. (or use a better browser (Better browser: anything but IE)

            Chris Held added a comment -

            That's a shame.
            We use the Latest Firefox and IE11, so only checked it for those two.

            Chris Held added a comment - That's a shame. We use the Latest Firefox and IE11, so only checked it for those two.

            @Chris - The workaround doesn't work for IE9 into Notepad

            Kevan Gelling added a comment - @Chris - The workaround doesn't work for IE9 into Notepad

            Chris Held added a comment -

            You're welcome

            Chris Held added a comment - You're welcome

            Hi Chris, thanks for sharing this!

            Hans-Peter Geier added a comment - Hi Chris, thanks for sharing this!

            Chris Held added a comment -

            @john: Use the workaround, set linenumbers=true. You'll have to change all the macros for that, but once this issue is fixed, you won't necessarily have to change 'm back. You'll be able to paste without losing the linebreaks.

            Chris Held added a comment - @john: Use the workaround, set linenumbers=true. You'll have to change all the macros for that, but once this issue is fixed, you won't necessarily have to change 'm back. You'll be able to paste without losing the linebreaks.

            John Price added a comment -

            This is quite a frustrating bug. We have a KB on our wiki that contains various useful SQL snippets, but we can no longer copy/paste them into a query tool because all the line breaks get lost.

            Please fix!

            John Price added a comment - This is quite a frustrating bug. We have a KB on our wiki that contains various useful SQL snippets, but we can no longer copy/paste them into a query tool because all the line breaks get lost. Please fix!

              jmcarthur James McArthur (Inactive)
              bberenberg Boris Berenberg (Inactive)
              Affected customers:
              48 This affects my team
              Watchers:
              43 Start watching this issue

                Created:
                Updated:
                Resolved: