🎨 数据库中表 blocksmarkdown 字段使用 Markdown 标记符 Fix https://github.com/siyuan-note/insider/issues/1053

This commit is contained in:
Liang Ding 2022-09-19 09:48:25 +08:00
parent 371062efdb
commit a383f8de68
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 21 additions and 10 deletions

View file

@ -307,7 +307,7 @@ func refsFromTree(tree *parse.Tree) (refs []*Ref, fileAnnotationRefs []*FileAnno
}
func buildRef(tree *parse.Tree, refNode *ast.Node) *Ref {
markdown := treenode.FormatNode(refNode, luteEngine)
markdown := treenode.ExportNodeStdMd(refNode, luteEngine)
defBlockID, text, _ := treenode.GetBlockRef(refNode)
var defBlockParentID, defBlockRootID, defBlockPath string
defBlock := treenode.GetBlockTree(defBlockID)
@ -525,7 +525,7 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) (
switch n.Type {
case ast.NodeLinkText:
text := n.Text()
markdown := treenode.FormatNode(n.Parent, luteEngine)
markdown := treenode.ExportNodeStdMd(n.Parent, luteEngine)
parentBlock := treenode.ParentBlock(n)
span := &Span{
ID: ast.NewNodeID(),
@ -556,7 +556,7 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) (
typ = typ + " " + n.TextMarkType
}
markdown := treenode.FormatNode(n, luteEngine)
markdown := treenode.ExportNodeStdMd(n, luteEngine)
parentBlock := treenode.ParentBlock(n)
span := &Span{
ID: ast.NewNodeID(),
@ -574,7 +574,7 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) (
return
case ast.NodeLinkDest:
text := n.TokensStr()
markdown := treenode.FormatNode(n.Parent, luteEngine)
markdown := treenode.ExportNodeStdMd(n.Parent, luteEngine)
parentBlock := treenode.ParentBlock(n)
span := &Span{
ID: ast.NewNodeID(),