♻️ Rename function code160to32 to nbsp2space

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-05 12:50:46 +08:00
parent 869849ce1b
commit a7514554e1
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 14 additions and 14 deletions

View file

@ -30,7 +30,7 @@ import {mobileKeydown} from "./util/keydown";
import {correctHotkey} from "../boot/globalEvent/commonHotkey";
import {processIOSPurchaseResponse} from "../util/iOSPurchase";
import {updateControlAlt} from "../protyle/util/hotKey";
import {code160to32} from "../protyle/util/code160to32";
import {nbsp2space} from "../protyle/util/nbsp2space";
class App {
public plugins: import("../plugin").Plugin[] = [];
@ -78,7 +78,7 @@ class App {
const copyElement = hasTopClosestByClassName(event.target, "protyle-action__copy");
if (copyElement) {
let text = copyElement.parentElement.nextElementSibling.textContent.trimEnd();
text = code160to32(text); // Replace non-breaking spaces with normal spaces when copying https://github.com/siyuan-note/siyuan/issues/9382
text = nbsp2space(text); // 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);
event.preventDefault();