Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
This reverts commit 8ca78a4.
  • Loading branch information
TCOTC committed Nov 25, 2024
1 parent 8ca78a4 commit 096e6fc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/src/boot/globalEvent/click.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +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;
if (!/(\n{2,})$/.test(text)) {
text = text.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 096e6fc

Please sign in to comment.