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

@ -773,7 +773,10 @@ export class Gutter {
selectsElement.forEach((item: HTMLElement) => {
html += getPlainText(item) + "\n";
});
copyPlainText(html.trimEnd());
let plainText = html.trimEnd();
// https://github.com/siyuan-note/siyuan/issues/14800
plainText = plainText.replace(/\u200D```/g, "```");
copyPlainText(plainText);
focusBlock(selectsElement[0]);
}
}, {
@ -1344,7 +1347,12 @@ export class Gutter {
label: window.siyuan.languages.copyPlainText,
accelerator: window.siyuan.config.keymap.editor.general.copyPlainText.custom,
click() {
copyPlainText(getPlainText(nodeElement as HTMLElement).trimEnd());
let plainText = getPlainText(nodeElement as HTMLElement).trimEnd();
if (type === "NodeCodeBlock") {
// https://github.com/siyuan-note/siyuan/issues/14800
plainText = plainText.replace(/\u200D```/g, "```");
}
copyPlainText(plainText);
focusBlock(nodeElement);
}
}, {