Skip to content

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

:art: fix #7921 (#7997)

颖逸28f39202c213
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index 7ee7ef4cc6..b9df094755 100644
--- a/app/src/protyle/toolbar/index.ts
+++ b/app/src/protyle/toolbar/index.ts
@@ -1105,8 +1105,8 @@ export class Toolbar {
if (!html.endsWith("\n</div>")) {
html = `${html}\n</div>`;
}
- // 需移除换行 https://github.com/siyuan-note/siyuan/issues/7921
- html = html.replace(/\n\n/g, "\n");
+ // 需移除连续的换行 (空行) https://github.com/siyuan-note/siyuan/issues/7921
+ html = html.replace(/\n+/g, "\n");
}
renderElement.querySelector("protyle-html").setAttribute("data-content", Lute.EscapeHTMLStr(html));
} else if (isInlineMemo) {