🎨 嵌入块纳入引用计数和反链 https://github.com/siyuan-note/siyuan/issues/7096
This commit is contained in:
parent
5ada15c0ed
commit
9c626ebc0b
1 changed files with 4 additions and 10 deletions
|
@ -342,8 +342,7 @@ func buildRef(tree *parse.Tree, refNode *ast.Node) *Ref {
|
|||
}
|
||||
|
||||
func buildEmbedRef(tree *parse.Tree, embedNode *ast.Node) *Ref {
|
||||
markdown := treenode.ExportNodeStdMd(embedNode, luteEngine)
|
||||
defBlockID, text := getEmbedRef(embedNode)
|
||||
defBlockID := getEmbedRef(embedNode)
|
||||
var defBlockParentID, defBlockRootID, defBlockPath string
|
||||
defBlock := treenode.GetBlockTree(defBlockID)
|
||||
if nil != defBlock {
|
||||
|
@ -362,19 +361,14 @@ func buildEmbedRef(tree *parse.Tree, embedNode *ast.Node) *Ref {
|
|||
RootID: tree.ID,
|
||||
Box: tree.Box,
|
||||
Path: tree.Path,
|
||||
Content: text,
|
||||
Markdown: markdown,
|
||||
Content: "",
|
||||
Markdown: "",
|
||||
Type: treenode.TypeAbbr(embedNode.Type.String()),
|
||||
}
|
||||
}
|
||||
|
||||
func getEmbedRef(embedNode *ast.Node) (queryBlockID, refText string) {
|
||||
func getEmbedRef(embedNode *ast.Node) (queryBlockID string) {
|
||||
queryBlockID = treenode.GetEmbedBlockRef(embedNode)
|
||||
if "" == queryBlockID {
|
||||
return
|
||||
}
|
||||
|
||||
refText = getRefText(queryBlockID)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue