Skip to content

Commit

Permalink
Fix clipboard code (#38380)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhlauke authored Mar 30, 2023
1 parent 3ba7ca4 commit 74c6f2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/assets/js/code-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

const clipboard = new ClipboardJS('.btn-clipboard', {
target: trigger => trigger.closest('.bd-code-snippet').querySelector('.highlight'),
text: trigger => trigger.parentNode.nextElementSibling.textContent.trimEnd()
text: trigger => trigger.closest('.bd-code-snippet').querySelector('.highlight').textContent.trimEnd()
})

clipboard.on('success', event => {
Expand Down

0 comments on commit 74c6f2b

Please sign in to comment.