From fdee0eb08ae7914e12567805fa3640076adef725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=AE=E7=94=9F?= Date: Fri, 21 May 2021 23:57:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E4=BF=A1=E6=81=AF=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E6=B8=B2=E6=9F=93):=20=E4=BF=AE=E5=A4=8D=E5=86=85?= =?UTF-8?q?=E8=81=94=E6=A0=B7=E5=BC=8F=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/toHTML.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/store/toHTML.go b/src/store/toHTML.go index 3ddb4ff..f5800f4 100644 --- a/src/store/toHTML.go +++ b/src/store/toHTML.go @@ -214,8 +214,11 @@ func (r *OceanpressRenderer) NodeSuperBlock(node *ast.Node, entering bool) ast.W html += r.renderNodeToHTML(n, true) } // TODO: 采用模板 - html = "
" + html + "
" + r.context.rawRenderer.Newline() + node.KramdownIAL = append(node.KramdownIAL, []string{"data-sb-layout", layout}) + r.context.rawRenderer.Tag("div", node.KramdownIAL, false) r.WriteHTML(html) + r.context.rawRenderer.Tag("/div", nil, false) return ast.WalkSkipChildren } @@ -305,6 +308,7 @@ func (r *OceanpressRenderer) 模板复制粘贴用(node *ast.Node, entering bool })(node, entering) } +// 文档根节点 func (r *OceanpressRenderer) NodeDocumentRender(node *ast.Node, entering bool) ast.WalkStatus { if entering { r.context.rawRenderer.Tag("main", node.KramdownIAL, false)