Don't panic on cells with both a rowspan and colspan in include_sizes_from_previous_rows

fixes #20162
This commit is contained in:
Manish Goregaokar 2018-03-01 15:17:57 -08:00
parent 6f2cd86b8e
commit be12b90412

View file

@ -123,7 +123,16 @@ impl TableRowFlow {
if *span == 1 {
break;
}
let incoming = incoming_rowspan_data[*col];
let incoming = if let Some(incoming) = incoming_rowspan_data.get(*col) {
*incoming
} else {
// This happens when we have a cell with both rowspan and colspan
// incoming_rowspan_data only records the data for the first column,
// but that's ok because we only need to account for each spanning cell
// once. So we skip ahead.
*col += 1;
continue;
};
*max_block_size = max(*max_block_size, incoming);
*col += 1;
}