From 61e88321b9e5dc67a0373edc69f8114db8c1d3b7 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 11 May 2014 18:01:31 +0100 Subject: Rename existing concept of style names to style IDs to match docx --- mammoth/conversion.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mammoth/conversion.py') diff --git a/mammoth/conversion.py b/mammoth/conversion.py index 8123ebd..56d0fae 100644 --- a/mammoth/conversion.py +++ b/mammoth/conversion.py @@ -104,8 +104,8 @@ class DocumentConverter(object): if _document_matcher_matches(document_matcher, element, element_type): return style.html_path - if element.style_name is not None: - self.messages.append(results.warning("Unrecognised {0} style: {1}".format(element_type, element.style_name))) + if element.style_id is not None: + self.messages.append(results.warning("Unrecognised {0} style: {1}".format(element_type, element.style_id))) return default @@ -113,8 +113,8 @@ class DocumentConverter(object): def _document_matcher_matches(matcher, element, element_type): return ( matcher.element_type == element_type and ( - matcher.style_name is None or - matcher.style_name == element.style_name + matcher.style_id is None or + matcher.style_id == element.style_id ) and ( element_type != "paragraph" or matcher.numbering is None or -- cgit v1.2.3