"Expand" table alignment values

This commit is contained in:
Xavier Mendez 2014-02-13 21:30:50 +01:00
parent 9882e5dd6d
commit 4cb9c5b9e3
3 changed files with 6 additions and 6 deletions

View file

@ -2252,7 +2252,7 @@ parse_table_header(
i++;
if (data[i] == ':') {
i++; (*column_data)[col] |= HOEDOWN_TABLE_ALIGN_L;
i++; (*column_data)[col] |= HOEDOWN_TABLE_ALIGN_LEFT;
dashes++;
}
@ -2261,7 +2261,7 @@ parse_table_header(
}
if (i < under_end && data[i] == ':') {
i++; (*column_data)[col] |= HOEDOWN_TABLE_ALIGN_R;
i++; (*column_data)[col] |= HOEDOWN_TABLE_ALIGN_RIGHT;
dashes++;
}

View file

@ -65,8 +65,8 @@ enum hoedown_listflags {
};
enum hoedown_tableflags {
HOEDOWN_TABLE_ALIGN_L = 1,
HOEDOWN_TABLE_ALIGN_R = 2,
HOEDOWN_TABLE_ALIGN_LEFT = 1,
HOEDOWN_TABLE_ALIGN_RIGHT = 2,
HOEDOWN_TABLE_ALIGN_CENTER = 3,
HOEDOWN_TABLE_ALIGNMASK = 3,
HOEDOWN_TABLE_HEADER = 4

View file

@ -451,11 +451,11 @@ rndr_tablecell(hoedown_buffer *ob, const hoedown_buffer *text, unsigned int flag
HOEDOWN_BUFPUTSL(ob, " style=\"text-align: center\">");
break;
case HOEDOWN_TABLE_ALIGN_L:
case HOEDOWN_TABLE_ALIGN_LEFT:
HOEDOWN_BUFPUTSL(ob, " style=\"text-align: left\">");
break;
case HOEDOWN_TABLE_ALIGN_R:
case HOEDOWN_TABLE_ALIGN_RIGHT:
HOEDOWN_BUFPUTSL(ob, " style=\"text-align: right\">");
break;