Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Clean code

Daniel8996effcb2a0
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index aee087ee5a..82dd881f6f 100644
--- a/app/src/protyle/util/paste.ts
+++ b/app/src/protyle/util/paste.ts
@@ -1,7 +1,7 @@
import {Constants} from "../../constants";
import {uploadFiles, uploadLocalFiles} from "../upload";
import {processPasteCode, processRender} from "./processCode";
-import {readText, writeText} from "./compatibility";
+import {readText} from "./compatibility";
/// #if !BROWSER
import {clipboard} from "electron";
/// #endif
@@ -95,7 +95,6 @@ export const getPlainText = (blockElement: HTMLElement, isNested = false) => {
export const pasteEscaped = async (protyle: IProtyle, nodeElement: Element) => {
try {
- // * _ [ ] ! \ ` < > & ~ { } ( ) = # $ ^ | .
let clipText = await readText();
// 删掉 <span data-type\="text".*>text</span> 标签,只保留文本
clipText = clipText.replace(/<span data-type="text".*?>(.*?)<\/span>/g, "$1");