Skip to content

Replace thead_row, tbody_row, tfoot_row with table_row

Alf Eaton requested to merge table-rows into master

Instead of keeping track of which rows are in a table's header, body, or footer, treat them all as rows and use the index to apply styles (and behaviour, in the future), then add them to the appropriate table section on export.

The current implementation assumes that there can only be 1 header row and 1 footer row (or none if they're suppressed), but it should be possible to extend that later if needed.

This also includes a fix to the encoder so that suppressed headers or footers can be re-enabled. The suppressHeader, suppressFooter and suppressCaption values are unusual in that they have to be either true or undefined, rather than true or false, and values set to undefined were being removed from the saved data. Now only empty strings are removed from the saved data. Perhaps we can revisit this later and make the boolean values required, set to false when they're not enabled, now that backwards compatibility is less of an issue.

Edited by Alf Eaton

Merge request reports