diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-05-11 18:01:31 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-05-11 18:01:31 +0100 |
| commit | 61e88321b9e5dc67a0373edc69f8114db8c1d3b7 (patch) | |
| tree | 3f43fd006b6c095f91c2424086b273928881336c /mammoth/conversion.py | |
| parent | 7e57058cf120717cc2d2fea3b897b12c3891b28a (diff) | |
Rename existing concept of style names to style IDs to match docx
Diffstat (limited to 'mammoth/conversion.py')
| -rw-r--r-- | mammoth/conversion.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 |
