* fix #13214 #13267

* fix #13214 #13267

* Revert "fix #13214 #13267"

This reverts commit 8ca78a4938.
This commit is contained in:
Jeffrey Chen 2024-11-27 11:33:37 +08:00 committed by GitHub
parent f441a37d50
commit 595842f915
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);