diff --git a/kernel/model/export.go b/kernel/model/export.go index c9b7f6ac3..a55bde8ff 100644 --- a/kernel/model/export.go +++ b/kernel/model/export.go @@ -583,6 +583,19 @@ func Preview(id string) (retStdHTML string) { enableLuteInlineSyntax(luteEngine) luteEngine.SetFootnotes(true) addBlockIALNodes(tree, false) + + // 移除超级块的属性列表 https://github.com/siyuan-note/siyuan/issues/13451 + var unlinks []*ast.Node + ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus { + if entering && ast.NodeKramdownBlockIAL == n.Type && nil != n.Previous && ast.NodeSuperBlock == n.Previous.Type { + unlinks = append(unlinks, n) + } + return ast.WalkContinue + }) + for _, unlink := range unlinks { + unlink.Unlink() + } + md := treenode.FormatNode(tree.Root, luteEngine) tree = parse.Parse("", []byte(md), luteEngine.ParseOptions) // 使用实际主题样式值替换样式变量 Use real theme style value replace var in preview mode https://github.com/siyuan-note/siyuan/issues/11458