projects
/
working
/
eg-antora.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61185ad
)
strip trailing space (left behind by callouts) when copying source
author
Dan Allen
<dan@opendevise.com>
Sat, 12 Dec 2020 03:33:33 +0000
(20:33 -0700)
committer
Dan Allen
<dan@opendevise.com>
Sat, 12 Dec 2020 03:33:33 +0000
(20:33 -0700)
src/js/06-copy-to-clipboard.js
patch
|
blob
|
history
diff --git
a/src/js/06-copy-to-clipboard.js
b/src/js/06-copy-to-clipboard.js
index
9562dfa
..
ab1de52
100644
(file)
--- a/
src/js/06-copy-to-clipboard.js
+++ b/
src/js/06-copy-to-clipboard.js
@@
-52,7
+52,7
@@
}
function writeToClipboard (code) {
- var text = code.innerText
+ var text = code.innerText
.replace(/ *$/gm, '')
if (code.dataset.lang === 'console' && text.startsWith('$ ')) text = extractCommands(text)
window.navigator.clipboard.writeText(text).then(
function () {