diff options
| author | Michael Williamson <mike@zwobble.org> | 2017-05-20 15:28:37 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2017-05-20 15:28:37 +0100 |
| commit | 838736f4d74b43d59aa7bdc96830e0be7fd7f258 (patch) | |
| tree | a0045111040e75ea3977af3c02ce372e8202fbfe /mammoth/documents.py | |
| parent | d0b4eb76001049a23fe038025cfa56472703fa70 (diff) | |
Read whether row is header
Diffstat (limited to 'mammoth/documents.py')
| -rw-r--r-- | mammoth/documents.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mammoth/documents.py b/mammoth/documents.py index a6e125c..dbd78dc 100644 --- a/mammoth/documents.py +++ b/mammoth/documents.py @@ -48,7 +48,7 @@ class Table(HasChildren): @cobble.data class TableRow(HasChildren): - pass + is_header = cobble.field() @cobble.data class TableCell(HasChildren): @@ -132,7 +132,10 @@ bookmark = Bookmark table = Table -table_row = TableRow + +def table_row(children, is_header=None): + return TableRow(children=children, is_header=bool(is_header)) + def table_cell(children, colspan=None, rowspan=None): if colspan is None: colspan = 1 |
