mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 数据库中表 blocks 的 markdown 字段使用 Markdown 标记符 Fix https://github.com/siyuan-note/insider/issues/1053
This commit is contained in:
parent
371062efdb
commit
a383f8de68
7 changed files with 21 additions and 10 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue