mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-21 06:24:06 +01:00
♻️ Rename function code160to32 to nbsp2space
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
869849ce1b
commit
a7514554e1
6 changed files with 14 additions and 14 deletions
|
|
@ -7,7 +7,7 @@ import {isWindow} from "../../util/functions";
|
|||
import {writeText} from "../../protyle/util/compatibility";
|
||||
import {showMessage} from "../../dialog/message";
|
||||
import {cancelDrag} from "./dragover";
|
||||
import {code160to32} from "../../protyle/util/code160to32";
|
||||
import {nbsp2space} from "../../protyle/util/nbsp2space";
|
||||
|
||||
export const globalClickHideMenu = (element: HTMLElement) => {
|
||||
if (!window.siyuan.menus.menu.element.contains(element) && !hasClosestByAttribute(element, "data-menu", "true")) {
|
||||
|
|
@ -43,7 +43,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$/, "");
|
||||
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
|
||||
// https://github.com/siyuan-note/siyuan/issues/14800
|
||||
text = text.replace(/\u200D```/g, "```");
|
||||
writeText(text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue