Fixed deprecated (see: https://www.w3.org/TR/html4/present/graphics.html#h-15.1.2) align property on tables. Now uses inline CSS.

This commit is contained in:
James 2018-10-29 15:59:30 -05:00
parent 9aa4d3fce9
commit 1025c0e7bd

View File

@ -786,7 +786,7 @@ func (r *HTMLRenderer) RenderNode(w io.Writer, node *Node, entering bool) WalkSt
if entering { if entering {
align := cellAlignment(node.Align) align := cellAlignment(node.Align)
if align != "" { if align != "" {
attrs = append(attrs, fmt.Sprintf(`align="%s"`, align)) attrs = append(attrs, fmt.Sprintf(`style="text-align: %s;"`, align))
} }
if node.Prev == nil { if node.Prev == nil {
r.cr(w) r.cr(w)