mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +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
|
|
@ -168,7 +168,7 @@ func processNestedNode(n *ast.Node, tag string, tags *[]string, unlinks *[]*ast.
|
|||
}
|
||||
|
||||
func NodeStaticMdContent(node *ast.Node, luteEngine *lute.Lute) (md, content string) {
|
||||
md = FormatNode(node, luteEngine)
|
||||
md = ExportNodeStdMd(node, luteEngine)
|
||||
content = NodeStaticContent(node)
|
||||
return
|
||||
}
|
||||
|
|
@ -182,6 +182,15 @@ func FormatNode(node *ast.Node, luteEngine *lute.Lute) string {
|
|||
return markdown
|
||||
}
|
||||
|
||||
func ExportNodeStdMd(node *ast.Node, luteEngine *lute.Lute) string {
|
||||
markdown, err := lute.ProtyleExportMdNodeSync(node, luteEngine.ParseOptions, luteEngine.RenderOptions)
|
||||
if nil != err {
|
||||
root := TreeRoot(node)
|
||||
logging.LogFatalf("export markdown for node [%s] in tree [%s] failed: %s", node.ID, root.ID, err)
|
||||
}
|
||||
return markdown
|
||||
}
|
||||
|
||||
func NodeStaticContent(node *ast.Node) string {
|
||||
if nil == node {
|
||||
return ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue