Skip to content

Commit

Permalink
Fix in the class :class:~benker.parsers.ooxml.OoxmlParser: rows wit…
Browse files Browse the repository at this point in the history
…h missing cells are filled with empty cells of the same nature as the row.
  • Loading branch information
laurent-laporte-pro committed Sep 16, 2019
1 parent 1cad470 commit 91a8cbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Fixed
the possible values for row/cell *nature* is "header", "body" and "footer"
(instead of "head", "body", "foot").

* Fix in the class :class:`~benker.parsers.ooxml.OoxmlParser`: rows with missing cells are filled
with empty cells of the same nature as the row.

Other
-----
Expand Down
2 changes: 1 addition & 1 deletion benker/parsers/ooxml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def parse_table(self, w_tbl):
if elem_tag == w('tr'):
# add missing entries
for _ in range(state.col_pos, len(state.table.cols)):
state.row.insert_cell(None)
state.row.insert_cell(None, nature=state.row.nature)

return state.table

Expand Down

0 comments on commit 91a8cbd

Please sign in to comment.