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 += ` | `;
}
}