From df9b6dc4d5ea59b8d941611f81bb1b3a421a2013 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 2 Dec 2022 23:19:20 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/6764 --- app/src/protyle/toolbar/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index a1ee8e9d4..e3a580a89 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -1022,9 +1022,10 @@ export class Toolbar { // 需 div 包裹,否则行内元素会解析错误 https://github.com/siyuan-note/siyuan/issues/6764 let html = textElement.value; if (!html.startsWith("
\n")) { - html = `
-${html} -
`; + html = `
\n${html}`; + } + if (!html.startsWith("\n
")) { + html = `${html}\n
`; } renderElement.querySelector("protyle-html").setAttribute("data-content", Lute.EscapeHTMLStr(html)); } else if (isInlineMemo) {