summaryrefslogtreecommitdiff
path: root/mammoth/conversion.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-07-21 12:19:15 +0100
committerMichael Williamson <mike@zwobble.org>2017-07-21 12:19:15 +0100
commit500a2aca545c47b9677bd85e55b9b24dc4ec9c7c (patch)
tree61a7bb91ae91ffd498b5ad1c2e5aac4178f72bb3 /mammoth/conversion.py
parent6f7fbaa001eda6aca41f9a4f54f526ef7b87b738 (diff)
Add style mapping for small caps
Diffstat (limited to 'mammoth/conversion.py')
-rw-r--r--mammoth/conversion.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mammoth/conversion.py b/mammoth/conversion.py
index 0fc3d58..066544e 100644
--- a/mammoth/conversion.py
+++ b/mammoth/conversion.py
@@ -109,6 +109,8 @@ class _DocumentConverter(documents.element_visitor(args=1)):
def visit_run(self, run, context):
nodes = lambda: self._visit_all(run.children, context)
paths = []
+ if run.is_small_caps:
+ paths.append(self._find_style_for_run_property("small_caps"))
if run.is_strikethrough:
paths.append(self._find_style_for_run_property("strikethrough", default="s"))
if run.is_underline:
@@ -346,7 +348,7 @@ class _DocumentConverter(documents.element_visitor(args=1)):
def _document_matcher_matches(matcher, element, element_type):
- if matcher.element_type in ["underline", "strikethrough", "bold", "italic", "comment_reference"]:
+ if matcher.element_type in ["underline", "strikethrough", "small_caps", "bold", "italic", "comment_reference"]:
return matcher.element_type == element_type
elif matcher.element_type == "break":
return (