mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-01 06:18:49 +01:00
🎨 Clean code
This commit is contained in:
parent
61828f5367
commit
8996effcb2
1 changed files with 1 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue