We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d335894 commit fd8373fCopy full SHA for fd8373f
src/js/06-copy-to-clipboard.js
@@ -52,7 +52,7 @@
52
}
53
54
function writeToClipboard (code) {
55
- var text = code.innerText
+ var text = code.innerText.replace(/ *$/gm, '')
56
if (code.dataset.lang === 'console' && text.startsWith('$ ')) text = extractCommands(text)
57
window.navigator.clipboard.writeText(text).then(
58
function () {
0 commit comments