Align td and th with css instead of align property

When you align tables with css, <td align="..."> gets overridden.
Using inline styles keeps alignment no matter what CSS contains.
This commit is contained in:
Balazs Nagy 2012-09-11 17:55:13 +03:00 committed by Devin Torres
parent 0f1b2a017f
commit 92c9d20b0a

View file

@ -444,15 +444,15 @@ rndr_tablecell(struct buf *ob, const struct buf *text, int flags, void *opaque)
switch (flags & MKD_TABLE_ALIGNMASK) {
case MKD_TABLE_ALIGN_CENTER:
BUFPUTSL(ob, " align=\"center\">");
BUFPUTSL(ob, " style=\"text-align: center\">");
break;
case MKD_TABLE_ALIGN_L:
BUFPUTSL(ob, " align=\"left\">");
BUFPUTSL(ob, " style=\"text-align: left\">");
break;
case MKD_TABLE_ALIGN_R:
BUFPUTSL(ob, " align=\"right\">");
BUFPUTSL(ob, " style=\"text-align: right\">");
break;
default: