You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when copying code with the code copy button, a new line is automatically added when pasting the copied code somewhere else. This does not happen if the code is copied manually by selecting everything in the code block. The expected behaviour of copying the code with the code copy button should be to copy only the content in the code block, without adding a new line.
Especially when copying code that should be run in a Terminal/command prompt, the new line that is automatically added when copying the code with the code copy button can lead to problems in some cases, e.g. code is run immediately when pasting. Expected behaviour of the code copy button should be exactly the same as for copying code manually: copy only the content in the code block without adding a new line.
Thanks for suggesting. Actually, this sounds more like a potential bug report, but it does not have a reproduction. If so, it is either related to Python Markdown or to Clipboard.js, since we're only providing the glue between both. We use the HTML that comes out of Python Markdown and add the copy button. Thus, please report this upstream. I recommend to create a minimal reproduction to understand where the newline is coming from.
Context
No response
Description
Currently, when copying code with the code copy button, a new line is automatically added when pasting the copied code somewhere else. This does not happen if the code is copied manually by selecting everything in the code block. The expected behaviour of copying the code with the code copy button should be to copy only the content in the code block, without adding a new line.
Related links
Use Cases
Especially when copying code that should be run in a Terminal/command prompt, the new line that is automatically added when copying the code with the code copy button can lead to problems in some cases, e.g. code is run immediately when pasting. Expected behaviour of the code copy button should be exactly the same as for copying code manually: copy only the content in the code block without adding a new line.
Visuals
No response
Before submitting
The text was updated successfully, but these errors were encountered: