aboutsummaryrefslogtreecommitdiff
path: root/mammoth/transforms.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-04-12 23:20:56 +0100
committerMichael Williamson <mike@zwobble.org>2017-04-12 23:20:56 +0100
commitf2db4aee1fe7007f410ef6cf51b0fdd5a1b1f49c (patch)
tree1b3bb9cb3d3958e62f08384e81a2e8619a34c594 /mammoth/transforms.py
parentd1dd5242d3139b964f7a5485afd5a8ed672c4600 (diff)
Add transform for runs
Diffstat (limited to 'mammoth/transforms.py')
-rw-r--r--mammoth/transforms.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mammoth/transforms.py b/mammoth/transforms.py
index 649b4db..62bfc1f 100644
--- a/mammoth/transforms.py
+++ b/mammoth/transforms.py
@@ -5,6 +5,10 @@ def paragraph(transform_paragraph):
return element_of_type(documents.Paragraph, transform_paragraph)
+def run(transform_run):
+ return element_of_type(documents.Run, transform_run)
+
+
def element_of_type(element_type, transform):
def transform_element(element):
if isinstance(element, element_type):