summaryrefslogtreecommitdiff
path: root/mammoth/documents.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-12-14 17:25:23 +0000
committerMichael Williamson <mike@zwobble.org>2013-12-14 17:25:23 +0000
commitf5595b78f59d3f3a04c4e83702114dc2704f808a (patch)
treebb58b9fc9fc28ac81f7d96f1c48a2cbf9f09968a /mammoth/documents.py
parenta5574fbb4540ca31ab0d4c639f6cd2a633e749fc (diff)
Match document matchers with numbering correctly
Diffstat (limited to 'mammoth/documents.py')
-rw-r--r--mammoth/documents.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mammoth/documents.py b/mammoth/documents.py
index ba03e92..0f2d767 100644
--- a/mammoth/documents.py
+++ b/mammoth/documents.py
@@ -37,4 +37,7 @@ image = Image
hyperlink = Hyperlink
-NumberingLevel = collections.namedtuple("NumberingLevel", ["level_index", "is_ordered"])
+def numbering_level(level_index, is_ordered):
+ return _NumberingLevel(str(level_index), bool(is_ordered))
+
+_NumberingLevel = collections.namedtuple("NumberingLevel", ["level_index", "is_ordered"])