Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/13590

Vanessa59b4323c4ce7
diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts
index 7c6187e851..2c261d68d0 100644
--- a/app/src/protyle/wysiwyg/input.ts
+++ b/app/src/protyle/wysiwyg/input.ts
@@ -113,11 +113,14 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
return;
}
// https://github.com/siyuan-note/siyuan/issues/9015
- if (type !== "NodeHeading" &&
- (editElement.innerHTML.startsWith("¥¥<wbr>") || editElement.innerHTML.startsWith("¥¥<wbr>") ||
- trimStartText.indexOf("\n¥¥<wbr>") > -1 || trimStartText.indexOf("\n¥¥<wbr>") > -1)) {
+ if (type === "NodeParagraph" && (
+ editElement.innerHTML.startsWith("¥¥<wbr>") || editElement.innerHTML.startsWith("¥¥<wbr>") ||
+ // https://ld246.com/article/1730020516427
+ trimStartText.indexOf("\n¥¥<wbr>") > -1 || trimStartText.indexOf("\n¥¥<wbr>") > -1
+ )) {
editElement.innerHTML = editElement.innerHTML.replace("¥¥<wbr>", "$$$$<wbr>").replace("¥¥<wbr>", "$$$$<wbr>");
}
+
const refElement = hasClosestByAttribute(range.startContainer, "data-type", "block-ref");
if (refElement && refElement.getAttribute("data-subtype") === "d") {
const response = await fetchSyncPost("/api/block/getRefText", {id: refElement.getAttribute("data-id")});