Skip to content

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

:bug: Fix paste as escaped text for list https://ld246.com/article/1711182399696

Daniel35b6e4c374a9
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index 2fa2311a63..e12ea5bee0 100644
--- a/app/src/protyle/util/paste.ts
+++ b/app/src/protyle/util/paste.ts
@@ -19,7 +19,7 @@ import {cellScrollIntoView} from "../render/av/cell";
export const pasteEscaped = async (protyle: IProtyle, nodeElement: Element) => {
try {
- // * _ [ ] ! \ ` < > & ~ { } ( ) = # $ ^ |
+ // * _ [ ] ! \ ` < > & ~ { } ( ) = # $ ^ | .
let clipText = await readText();
// https://github.com/siyuan-note/siyuan/issues/5446
// A\B\C\D\
@@ -47,7 +47,8 @@ export const pasteEscaped = async (protyle: IProtyle, nodeElement: Element) => {
.replace(/#/g, "\\#")
.replace(/\$/g, "\\$")
.replace(/\^/g, "\\^")
- .replace(/\|/g, "\\|");
+ .replace(/\|/g, "\\|")
+ .replace(/\./g, "\\.");
pasteText(protyle, clipText, nodeElement);
} catch (e) {
console.log(e);