瀏覽代碼

:sparkles: 行级元素支持多重样式类型 https://github.com/siyuan-note/siyuan/issues/2911

Liang Ding 2 年之前
父節點
當前提交
02d9245bcf
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      kernel/model/tree.go

+ 5 - 1
kernel/model/tree.go

@@ -90,7 +90,11 @@ func resetTree(tree *parse.Tree, titleSuffix string) {
 			return ast.WalkContinue
 		}
 		if "1" != refIDs[defID] {
-			n.Tokens = []byte(refIDs[defID])
+			if ast.NodeBlockRefID == n.Type {
+				n.Tokens = []byte(refIDs[defID])
+			} else if ast.NodeTextMark == n.Type {
+				n.TextMarkBlockRefID = refIDs[defID]
+			}
 		}
 		return ast.WalkContinue
 	})