This commit is contained in:
GH Action - Upstream Sync 2024-09-24 00:56:02 +00:00
commit 46180af52a

View File

@ -128,8 +128,9 @@ export function PreCode(props: { children: any }) {
className="copy-code-button"
onClick={() => {
if (ref.current) {
const code = ref.current.innerText;
copyToClipboard(code);
copyToClipboard(
ref.current.querySelector("code")?.innerText ?? "",
);
}
}}
></span>