Fix table rowspan and colspan
Origin: https://github.com/tats/w3m/pull/19 Bug-Debian: https://github.com/tats/w3m/issues/8
This commit is contained in:
committed by
Tatsuya Kinoshita
parent
010b68580d
commit
67a3db378f
@@ -2599,12 +2599,16 @@ feed_table_tag(struct table *tbl, char *line, struct table_mode *mode,
|
|||||||
if ((tbl->row + rowspan) >= tbl->max_rowsize)
|
if ((tbl->row + rowspan) >= tbl->max_rowsize)
|
||||||
check_row(tbl, tbl->row + rowspan);
|
check_row(tbl, tbl->row + rowspan);
|
||||||
}
|
}
|
||||||
|
if (rowspan < 1)
|
||||||
|
rowspan = 1;
|
||||||
if (parsedtag_get_value(tag, ATTR_COLSPAN, &colspan)) {
|
if (parsedtag_get_value(tag, ATTR_COLSPAN, &colspan)) {
|
||||||
if ((tbl->col + colspan) >= MAXCOL) {
|
if ((tbl->col + colspan) >= MAXCOL) {
|
||||||
/* Can't expand column */
|
/* Can't expand column */
|
||||||
colspan = MAXCOL - tbl->col;
|
colspan = MAXCOL - tbl->col;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (colspan < 1)
|
||||||
|
colspan = 1;
|
||||||
if (parsedtag_get_value(tag, ATTR_ALIGN, &i)) {
|
if (parsedtag_get_value(tag, ATTR_ALIGN, &i)) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case ALIGN_LEFT:
|
case ALIGN_LEFT:
|
||||||
|
|||||||
Reference in New Issue
Block a user