Obsolete attribute align on td with Goldmark

The markdown

| Tag (decimal)         | Tag (hex)             | Type                  |
| ---------------------:| ---------------------:| --------------------- |
| 2                     | 02                    | INTEGER               |

With Goldmark generate html containing

<td align="right">2</td>

Witch is not valid: the align attribute is obsolete https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-align and marked as ERROR with html5validator.

Related (for Blackfriday) : Markdown table rendered by Hugo includes invalid HTML

The Goldmark code suggest they know about it: https://github.com/yuin/goldmark/blob/master/extension/table.go#L287 and that we may be able to «override “align” attribute» https://github.com/yuin/goldmark/pull/78#issuecomment-568905772 but how? (ideally to specify the wanted css class to do the same, to avoid inline style) Is it something that Hugo needs to implement?

1 Like

I’ve opened an issue there: https://github.com/gohugoio/hugo/issues/7244