Skip to content

Commit

Permalink
fix 13214 siyuan-note#13267
Browse files Browse the repository at this point in the history
  • Loading branch information
TCOTC committed Nov 25, 2024
1 parent 23ee202 commit d9922da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/boot/globalEvent/click.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d9922da

Please sign in to comment.