From ade2f7706813d785345563c57e7baf902ea2a7f4 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 4 Nov 2017 11:25:51 +0000 Subject: Add style mappings for tables --- mammoth/document_matchers.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mammoth/document_matchers.py') 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" -- cgit v1.2.3