Skip to content

Commit 616df62

Browse files
authored
trim ending newline on copied code (#1296)
Signed-off-by: Matthew Peveler <[email protected]>
1 parent d2e11a3 commit 616df62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/javascripts/app/_copy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function copyToClipboard(container) {
22
const el = document.createElement('textarea');
3-
el.value = container.textContent;
3+
el.value = container.textContent.replace(/\n$/, '');
44
document.body.appendChild(el);
55
el.select();
66
document.execCommand('copy');

0 commit comments

Comments
 (0)