Browse Source

:art: 导出没有内容的引述块为模板时添加空段落块 https://github.com/siyuan-note/siyuan/issues/7211

Liang Ding 2 years ago
parent
commit
79efdb8e08
1 changed files with 5 additions and 1 deletions
  1. 5 1
      kernel/model/template.go

+ 5 - 1
kernel/model/template.go

@@ -258,7 +258,11 @@ func renderTemplate(p, id string) (string, error) {
 		return ast.WalkContinue
 	})
 	for _, n := range nodesNeedAppendChild {
-		n.AppendChild(treenode.NewParagraph())
+		if ast.NodeBlockquote == n.Type {
+			n.FirstChild.InsertAfter(treenode.NewParagraph())
+		} else {
+			n.AppendChild(treenode.NewParagraph())
+		}
 	}
 	for _, n := range unlinks {
 		n.Unlink()