Skip to content

Commit 191c255

Browse files
authored
fix: code snippet copy trimmed (#62)
1 parent 1359e0c commit 191c255

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/js/alpine/codeBlock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default () => ({
44
copyToClipboard() {
55
navigator.clipboard.writeText(
66
// This requires torchlight.options.copyable to be "true" on the PHP side.
7-
this.$root.querySelector('.torchlight-copy-target').textContent
7+
this.$root.querySelector('.torchlight-copy-target').textContent.trim()
88
).then(() => this.showMessage = true)
99

1010
setTimeout(() => (this.showMessage = false), 2000)

0 commit comments

Comments
 (0)