From 11316ea0b98542899c7c3f7cb924ffd60db63a7e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 27 Nov 2024 11:39:40 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/pull/13271 --- app/src/boot/globalEvent/click.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/boot/globalEvent/click.ts b/app/src/boot/globalEvent/click.ts index bf741472b..01b869415 100644 --- a/app/src/boot/globalEvent/click.ts +++ b/app/src/boot/globalEvent/click.ts @@ -66,7 +66,7 @@ export const globalClick = (event: MouseEvent & { target: HTMLElement }) => { } const copyElement = hasTopClosestByClassName(event.target, "protyle-action__copy"); if (copyElement) { - let text = copyElement.parentElement.nextElementSibling.textContent.replace("/\n$/", ""); + let text = copyElement.parentElement.nextElementSibling.textContent.replace(/\n$/, ""); text = text.replace(/\u00A0/g, " "); // Replace non-breaking spaces with normal spaces when copying https://github.com/siyuan-note/siyuan/issues/9382 writeText(text); showMessage(window.siyuan.languages.copied, 2000);