This commit is contained in:
Jeffrey Chen 2026-01-04 21:06:00 +08:00 committed by GitHub
parent 27810da357
commit 12456ce23a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 21 additions and 13 deletions

View file

@ -43,6 +43,8 @@ export const globalClick = (event: MouseEvent & { target: HTMLElement }) => {
if (copyElement) {
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
// https://github.com/siyuan-note/siyuan/issues/14800
text = text.replace(/\u200D```/g, "```");
writeText(text);
showMessage(window.siyuan.languages.copied, 2000);
event.preventDefault();