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/styles/parser/document_matcher_parser.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mammoth/styles/parser') diff --git a/mammoth/styles/parser/document_matcher_parser.py b/mammoth/styles/parser/document_matcher_parser.py index 034c59c..b9e09f3 100644 --- a/mammoth/styles/parser/document_matcher_parser.py +++ b/mammoth/styles/parser/document_matcher_parser.py @@ -24,7 +24,16 @@ def parse_document_matcher(tokens): style_id=style_id, style_name=style_name, ) - + + elif tokens.try_skip(TokenType.IDENTIFIER, "table"): + style_id = try_parse_class_name(tokens) + style_name = _parse_style_name(tokens) + + return document_matchers.table( + style_id=style_id, + style_name=style_name, + ) + elif tokens.try_skip(TokenType.IDENTIFIER, "b"): return document_matchers.bold -- cgit v1.2.3