Quellcode durchsuchen

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

Vanessa vor 8 Monaten
Ursprung
Commit
1c00b91aa7
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  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 (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");
                             inlineElement.setAttribute("data-type", type);
                             inlineElement.textContent = item.textContent;