- if (tbl->last_span) {
- assert(tbl->last_span->layout);
- if (tbl->last_span->pos == TBL_SPAN_DATA) {
- for (rp = tbl->last_span->layout->next;
- rp && rp->first; rp = rp->next) {
- switch (rp->first->pos) {
- case TBL_CELL_HORIZ:
- dp = newspan(tbl, ln, rp);
- dp->pos = TBL_SPAN_HORIZ;
- continue;
- case TBL_CELL_DHORIZ:
- dp = newspan(tbl, ln, rp);
- dp->pos = TBL_SPAN_DHORIZ;
- continue;
- default:
- break;
- }
+ while (rp->next != NULL) {
+ if (rp->last->col + 1 < tbl->opts.cols)
+ break;
+ for (cp = rp->first; cp != NULL; cp = cp->next)
+ if (cp->pos != TBL_CELL_HORIZ &&
+ cp->pos != TBL_CELL_DHORIZ)