diff options
| author | Michael Williamson <mike@zwobble.org> | 2017-11-04 11:25:51 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2017-11-04 11:25:51 +0000 |
| commit | ade2f7706813d785345563c57e7baf902ea2a7f4 (patch) | |
| tree | 5003acc0e03415dbe3eb71e2f35cbd8285661975 /mammoth/document_matchers.py | |
| parent | 1498397f4ede71d81ec79f380d43ec041438a047 (diff) | |
Add style mappings for tables
Diffstat (limited to 'mammoth/document_matchers.py')
| -rw-r--r-- | mammoth/document_matchers.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mammoth/document_matchers.py b/mammoth/document_matchers.py index 6429911..91adf3f 100644 --- a/mammoth/document_matchers.py +++ b/mammoth/document_matchers.py @@ -19,6 +19,14 @@ RunMatcher = collections.namedtuple("RunMatcher", ["style_id", "style_name"]) RunMatcher.element_type = "run" +def table(style_id=None, style_name=None): + return TableMatcher(style_id, style_name) + + +TableMatcher = collections.namedtuple("TableMatcher", ["style_id", "style_name"]) +TableMatcher.element_type = "table" + + class bold(object): element_type = "bold" |
