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

This commit is contained in:
Daniel 2024-03-24 09:25:05 +08:00
parent 5a9ce91d03
commit 35b6e4c374
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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);