diff options
| author | Michael Williamson <mike@zwobble.org> | 2020-11-05 19:43:01 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2020-11-05 19:43:01 +0000 |
| commit | 8fde170b06becb51d2650b60dd28e23eaf862e25 (patch) | |
| tree | 3e804a680218dabe24470ea71b7cdadb6e0d3fb3 /mammoth/conversion.py | |
| parent | fd10b8d93b361e80bb1fc5b19f19465fc51d9b77 (diff) | |
Add style mapping for all caps
Diffstat (limited to 'mammoth/conversion.py')
| -rw-r--r-- | mammoth/conversion.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mammoth/conversion.py b/mammoth/conversion.py index d463116..bdc8687 100644 --- a/mammoth/conversion.py +++ b/mammoth/conversion.py @@ -111,6 +111,8 @@ class _DocumentConverter(documents.element_visitor(args=1)): paths = [] if run.is_small_caps: paths.append(self._find_style_for_run_property("small_caps")) + if run.is_all_caps: + paths.append(self._find_style_for_run_property("all_caps")) if run.is_strikethrough: paths.append(self._find_style_for_run_property("strikethrough", default="s")) if run.is_underline: @@ -353,7 +355,7 @@ class _DocumentConverter(documents.element_visitor(args=1)): def _document_matcher_matches(matcher, element, element_type): - if matcher.element_type in ["underline", "strikethrough", "small_caps", "bold", "italic", "comment_reference"]: + if matcher.element_type in ["underline", "strikethrough", "all_caps", "small_caps", "bold", "italic", "comment_reference"]: return matcher.element_type == element_type elif matcher.element_type == "break": return ( |
