summaryrefslogtreecommitdiff
path: root/mammoth/documents.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-11-03 16:30:11 +0000
committerMichael Williamson <mike@zwobble.org>2017-11-03 16:30:11 +0000
commit1498397f4ede71d81ec79f380d43ec041438a047 (patch)
tree8b9751ed744ca75cf6aa140fe227c94431129e1e /mammoth/documents.py
parentcd95535a1bb0f486d4a102cfc622ae5228c3071d (diff)
Read table style applied to tables
Diffstat (limited to 'mammoth/documents.py')
-rw-r--r--mammoth/documents.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mammoth/documents.py b/mammoth/documents.py
index d89de3f..e4372ab 100644
--- a/mammoth/documents.py
+++ b/mammoth/documents.py
@@ -46,7 +46,8 @@ class Hyperlink(HasChildren):
@cobble.data
class Table(HasChildren):
- pass
+ style_id = cobble.field()
+ style_name = cobble.field()
@cobble.data
class TableRow(HasChildren):
@@ -141,7 +142,8 @@ class Bookmark(Element):
bookmark = Bookmark
-table = Table
+def table(children, style_id=None, style_name=None):
+ return Table(children=children, style_id=style_id, style_name=style_name)
def table_row(children, is_header=None):
return TableRow(children=children, is_header=bool(is_header))