Conversation
title rows used improper <th><td> instead of <tr><th>
|
I would not like to break the API and the API would be confusing that adds thinking overhead when it could be automatic. Feel like there should be internal state that tracks whether it is the first row and then use that as implementation detail ? |
54ac8f8 to
8a66c54
Compare
|
Thanks for the feedback @pinkforest ! Deciding the cell type should not be based upon the order, since it is already given by the table as a separate row. To eliminate the API-change in |
- adds `CellType` for each `Cell` with corresponding getter/setter - in `Cell::print_html()` choose `<th>` or `<td>` based on `cell_type` - add `Row::set_cell_type()` to set type for all cells in a row - always set title-row to `CellType::Head`
8a66c54 to
d65ea7f
Compare
As described in #159 ,
.print_html()produced wrong html for title-rows.This PR fixes this issue by introducing a boolean
titleflag inCell::print_html/Row::print_htmlto select the appropriate tag (tdorth).