瀏覽代碼

:memo: https://github.com/siyuan-note/siyuan/issues/12922

Vanessa 9 月之前
父節點
當前提交
cf56be53b3
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/src/protyle/toolbar/index.ts

+ 3 - 1
app/src/protyle/toolbar/index.ts

@@ -493,7 +493,9 @@ export class Toolbar {
                             hasSameTextStyle(item, nextElement, textObj)) {
                             nextIndex = item.textContent.length;
                             nextElement.innerHTML = item.textContent + nextElement.innerHTML;
-                        } else if (item.textContent !== Constants.ZWSP ||
+                        } else if (
+                            // 图片会有零宽空格,但图片不进行处理 https://github.com/siyuan-note/siyuan/issues/12840
+                            item.textContent !== Constants.ZWSP ||
                             // tag 会有零宽空格 https://github.com/siyuan-note/siyuan/issues/12922
                             (item.textContent === Constants.ZWSP && !rangeTypes.includes("img"))) {
                             const inlineElement = document.createElement("span");