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 167fbbd commit 1c10187Copy full SHA for 1c10187
src/hooks/useCodeCopy.ts
@@ -9,7 +9,7 @@ export const useCodeCopy = () => {
9
e.target.closest("button.copy-button")
10
if (button) {
11
if (button.classList.contains("copied")) return
12
- const pre = button.nextElementSibling
+ const pre = button.nextElementSibling?.children[0]
13
if (pre?.tagName === "PRE") {
14
clipboardCopy(pre.textContent || "")
15
const textEl = button.querySelector("span:nth-child(2)")
0 commit comments