🐛 查询嵌入块多层嵌套导出不完整 Fix https://github.com/siyuan-note/siyuan/issues/5558

This commit is contained in:
Liang Ding 2022-08-02 11:17:08 +08:00
parent 574a98f5d0
commit 478ba156cd
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 10 additions and 8 deletions

View file

@ -1218,6 +1218,7 @@ func resolveFootnotesDefs(refFootnotes *[]*refAsFootnotes, rootID string) (footn
}
footnotesDefBlock = &ast.Node{Type: ast.NodeFootnotesDefBlock}
var rendered []string
for _, foot := range *refFootnotes {
t, err := loadTreeByBlockID(foot.defID)
if nil != err {
@ -1261,9 +1262,8 @@ func resolveFootnotesDefs(refFootnotes *[]*refAsFootnotes, rootID string) (footn
stmt := n.ChildByType(ast.NodeBlockQueryEmbedScript).TokensStr()
stmt = html.UnescapeString(stmt)
sqlBlocks := sql.SelectBlocksRawStmt(stmt, Conf.Search.Limit)
depth := 0
for _, b := range sqlBlocks {
subNodes := renderBlockMarkdownR0(b.ID, &depth)
subNodes := renderBlockMarkdownR0(b.ID, &rendered)
for _, subNode := range subNodes {
if ast.NodeListItem == subNode.Type {
parentList := &ast.Node{Type: ast.NodeList, ListData: &ast.ListData{Typ: subNode.ListData.Typ}}