diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index 516a154be..10a3f2b82 100644
--- a/app/src/protyle/toolbar/index.ts
+++ b/app/src/protyle/toolbar/index.ts
@@ -561,10 +561,6 @@ export class Toolbar {
nextIndex = item.textContent.length;
nextElement.innerHTML = item.innerHTML + nextElement.innerHTML;
} else if (item.tagName !== "BR" && item.tagName !== "IMG") {
- if (item.getAttribute("data-type")?.indexOf("backslash") > -1 &&
- item.firstChild?.textContent === "\\") {
- item.firstChild.remove();
- }
item.setAttribute("data-type", types.join(" "));
setFontStyle(item, textObj);
newNodes.push(item);
diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts
index b172d920f..068f7f2c5 100644
--- a/app/src/protyle/wysiwyg/input.ts
+++ b/app/src/protyle/wysiwyg/input.ts
@@ -145,13 +145,8 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
if (blockElement.classList.contains("table")) {
scrollLeft = getContenteditableElement(blockElement).scrollLeft;
}
- if (/\\<\/span>.<\/span>/.test(html)) {
- // 转义不需要添加 zwsp
- blockElement.outerHTML = html;
- } else {
- // 使用 md 闭合后继续输入应为普通文本
- blockElement.outerHTML = html.replace("", "" + Constants.ZWSP + "");
- }
+ // 使用 md 闭合后继续输入应为普通文本
+ blockElement.outerHTML = html.replace("", "" + Constants.ZWSP + "");
protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${id}"]`).forEach((item: HTMLElement) => {
if (item.getAttribute("data-type") === "NodeBlockQueryEmbed" ||
!hasClosestByAttribute(item, "data-type", "NodeBlockQueryEmbed")) {
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index fcbd09e44..aff24df76 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -757,27 +757,6 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
return;
}
}
- // 行首转义符前删除 https://github.com/siyuan-note/siyuan/issues/6092
- if (range.startOffset === 0 && selectText === "" &&
- previousSibling && previousSibling.parentElement.getAttribute("data-type")?.indexOf("backslash") > -1 &&
- previousSibling.nodeType !== 3 && (previousSibling as HTMLElement).outerHTML === "\\" &&
- !hasPreviousSibling(previousSibling.parentElement)) {
- range.setStartBefore(previousSibling.parentElement);
- removeBlock(protyle, nodeElement, range);
- event.stopPropagation();
- event.preventDefault();
- return;
- }
- // 光标位于转义符前 F5 后,rang 和点击后的不同,也需进行判断
- if (range.startOffset === 1 && range.startContainer.nodeType !== 3 &&
- range.startContainer.parentElement.getAttribute("data-type")?.indexOf("backslash") > -1 &&
- !hasPreviousSibling(range.startContainer.parentElement)) {
- range.setStartBefore(range.startContainer.parentElement);
- removeBlock(protyle, nodeElement, range);
- event.stopPropagation();
- event.preventDefault();
- return;
- }
const imgSelectElement = protyle.wysiwyg.element.querySelector(".img--select");
if (imgSelectElement) {
imgSelectElement.classList.remove("img--select");