Skip to content

Commit

Permalink
Some more fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Miek Gieben <[email protected]>
  • Loading branch information
miekg committed Aug 23, 2018
1 parent a213f2a commit 609e4fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xml2/renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,12 @@ func (r *Renderer) RenderNode(w io.Writer, node ast.Node, entering bool) ast.Wal
r.codeBlock(w, node)
case *ast.Caption:
// no tags because we are used in attributes, i.e. title=
r.outOneOf(w, entering, "", "")
// See comment in xml/renderer.go. The same is true here, *but*, because we don't
// output any tags, the problem does not show up. As a matter of consistency we apply
// the same (dumb) precaution.
if len(node.GetChildren()) > 0 {
r.outOneOf(w, entering, "", "")
}
case *ast.CaptionFigure:
r.captionFigure(w, node, entering)
case *ast.Table:
Expand Down

0 comments on commit 609e4fe

Please sign in to comment.