mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Improve export of empty documents with subdocuments https://github.com/siyuan-note/siyuan/issues/16040
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
d4c9159540
commit
156899cb44
1 changed files with 10 additions and 7 deletions
|
|
@ -2039,15 +2039,18 @@ func exportMarkdownContent(id, ext string, exportRefMode int, defBlockIDs []stri
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
for c := tree.Root.FirstChild; nil != c; c = c.Next {
|
refCount := sql.QueryRootChildrenRefCount(tree.ID)
|
||||||
if ast.NodeParagraph == c.Type {
|
if !Conf.Export.MarkdownYFM && 5 > len(tree.Root.KramdownIAL) && 1 > len(refCount) {
|
||||||
isEmpty = nil == c.FirstChild
|
for c := tree.Root.FirstChild; nil != c; c = c.Next {
|
||||||
if !isEmpty {
|
if ast.NodeParagraph == c.Type {
|
||||||
|
isEmpty = nil == c.FirstChild
|
||||||
|
if !isEmpty {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
isEmpty = false
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
isEmpty = false
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue