From 002b5adf163e37323a094d4ecffb507105b68860 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 13 Mar 2023 14:52:28 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7631 --- app/src/protyle/util/table.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/util/table.ts b/app/src/protyle/util/table.ts index 00c218300..7a1bcf101 100644 --- a/app/src/protyle/util/table.ts +++ b/app/src/protyle/util/table.ts @@ -76,7 +76,7 @@ export const insertRow = (protyle: IProtyle, range: Range, cellElement: HTMLElem let rowHTML = ""; for (let m = 0; m < cellElement.parentElement.childElementCount; m++) { - rowHTML += ` `; + rowHTML += ``; } let newRowElememt: HTMLTableRowElement; if (cellElement.tagName === "TH") { @@ -113,10 +113,11 @@ export const insertRowAbove = (protyle: IProtyle, range: Range, cellElement: HTM if (className === "fn__none") { hasNone = true; } + // 不需要空格,否则列宽调整后在空格后插入图片会换行 https://github.com/siyuan-note/siyuan/issues/7631 if (cellElement.tagName === "TH") { - rowHTML += ` `; + rowHTML += ``; } else { - rowHTML += ` `; + rowHTML += ``; } }