Skip to content

Commit e94fa87

Browse files
committed
skip document node
Signed-off-by: Andrew Thornton <[email protected]>
1 parent f691ade commit e94fa87

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/markup/html.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ func postProcess(ctx *RenderContext, procs []processor, input io.Reader, output
309309
return &postProcessError{"invalid HTML", err}
310310
}
311311

312+
if node.Type == html.DocumentNode {
313+
node = node.FirstChild
314+
}
315+
312316
visitNode(ctx, procs, node, true)
313317

314318
newNodes := make([]*html.Node, 0, 5)

0 commit comments

Comments
 (0)