From 28f39202c213638e2b34207bb6058bb6467acf4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Fri, 14 Apr 2023 16:38:35 +0800 Subject: [PATCH] :art: fix #7921 (#7997) --- app/src/protyle/toolbar/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 7ee7ef4cc..b9df09475 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")) { html = `${html}\n`; } - // 需移除换行 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) {