Title: Buggy behaviour with the copy code functionality
Last modified: February 23, 2024

---

# Buggy behaviour with the copy code functionality

 *  Resolved Anonymous User
 * (@anonymized-20871082)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/buggy-behaviour-with-the-copy-code-functionality/)
 * Test page access is **copy-demo**
 * Try to copy the code and the buggy behaviour is:
    - The word Copy gets removed from Copyright
    - the formatting is lost, empty spaces are removed
 * as this is just for demonstration, we use some spaces in other code places and
   it gets removed as such code is hard to read after copy-paste, there is no block
   building plugin used its simple gutenberg <code> element
 * Origianl code:
 *     ```wp-block-code
       /*
        * Copyright (c) 2022 Nordic Semiconductor
        * SPDX-License-Identifier: Apache-2.0
        */
   
       &pinctrl {
   
       };
       ```
   
 * Copied code:
 *     ```wp-block-code
       /*
        * right (c) 2022 Nordic Semiconductor
        * SPDX-License-Identifier: Apache-2.0
        */
       &pinctrl {
       };
       ```
   
    -  This topic was modified 2 years, 3 months ago by Anonymous User.
    -  This topic was modified 2 years, 3 months ago by Anonymous User.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fbuggy-behaviour-with-the-copy-code-functionality%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter Anonymous User
 * (@anonymized-20871082)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/buggy-behaviour-with-the-copy-code-functionality/#post-17496132)
 * Is there any solution to fix this ?
 *  Plugin Author [Mahesh Waghmare](https://wordpress.org/support/users/mahesh901122/)
 * (@mahesh901122)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/buggy-behaviour-with-the-copy-code-functionality/#post-17496173)
 * Hello,
 * The issue exists.
 * The copy word removed from the content which need to fix it.
 * We’ll release another update tonight with that fix.
 * If you have any questions then feel free to contact me on: [mwaghmare7@gmail.com](https://wordpress.org/support/topic/buggy-behaviour-with-the-copy-code-functionality/mwaghmare7@gmail.com?output_format=md)
 * Thank you
 *  Thread Starter Anonymous User
 * (@anonymized-20871082)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/buggy-behaviour-with-the-copy-code-functionality/#post-17519852)
 * 4 weeks passed no fix provided, should i start searching for alternative plugin?
 *  Plugin Author [Mahesh Waghmare](https://wordpress.org/support/users/mahesh901122/)
 * (@mahesh901122)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/buggy-behaviour-with-the-copy-code-functionality/#post-17678743)
 * Hello @montifit
 * The issue is with the `<code>` tag.
 * Please use the `<pre>` tag instead.
 * The `<code>` tag keep the spaces and the `<pre>` tag convert the spaces to the`
   <br>` tag.
 * So, It works with `pre` tag as expected.
 * Please check it and let me know.
 *  Thread Starter Anonymous User
 * (@anonymized-20871082)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/buggy-behaviour-with-the-copy-code-functionality/#post-17679025)
 * This solution did not work as the project needs `code` block but the setting 
   `
   Format` to `Google Docs` works as a solution Than you Mahesh

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Buggy behaviour with the copy code functionality’ is closed to new replies.

 * ![](https://ps.w.org/copy-the-code/assets/icon-256x256.png?rev=3451645)
 * [Copy Anything to Clipboard for WordPress – Copy Button, Copy Text & Copy Code](https://wordpress.org/plugins/copy-the-code/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/copy-the-code/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/copy-the-code/)
 * [Active Topics](https://wordpress.org/support/plugin/copy-the-code/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/copy-the-code/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/copy-the-code/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: Anonymous User
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/buggy-behaviour-with-the-copy-code-functionality/#post-17679025)
 * Status: resolved