Parcourir la source

Merge remote-tracking branch 'origin/dev' into dev

Vanessa il y a 1 an
Parent
commit
7bbccbae3b
1 fichiers modifiés avec 13 ajouts et 0 suppressions
  1. 13 0
      kernel/model/blockinfo.go

+ 13 - 0
kernel/model/blockinfo.go

@@ -114,6 +114,19 @@ func GetBlockRefText(id string) string {
 	if nil == node {
 		return ErrBlockNotFound.Error()
 	}
+
+	ast.Walk(node, func(n *ast.Node, entering bool) ast.WalkStatus {
+		if !entering {
+			return ast.WalkContinue
+		}
+
+		if n.IsTextMarkType("inline-memo") {
+			// Block ref anchor text no longer contains contents of inline-level memos https://github.com/siyuan-note/siyuan/issues/9363
+			n.TextMarkInlineMemoContent = ""
+			return ast.WalkContinue
+		}
+		return ast.WalkContinue
+	})
 	return getNodeRefText(node)
 }