Consider colspan attributes when adding table cells/rows

pull/40/head
Thomas Bruederli 12 years ago
parent 834d71e058
commit ef7a786b38

@ -643,9 +643,9 @@ class html_table extends html
$cell->content = $cont;
$this->rows[$this->rowindex]->cells[$this->colindex] = $cell;
$this->colindex++;
$this->colindex += max(1, intval($attr['colspan']));
if ($this->attrib['cols'] && $this->colindex == $this->attrib['cols']) {
if ($this->attrib['cols'] && $this->colindex >= $this->attrib['cols']) {
$this->add_row();
}
}

Loading…
Cancel
Save