From a828b007d3fffc17235c120f79d4082047cd5f94 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 11 Sep 2025 15:31:41 +0100 Subject: Avoid duplicating default level index --- mammoth/docx/numbering_xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mammoth/docx/numbering_xml.py b/mammoth/docx/numbering_xml.py index 4614d0e..0bd1952 100644 --- a/mammoth/docx/numbering_xml.py +++ b/mammoth/docx/numbering_xml.py @@ -51,7 +51,7 @@ def _read_abstract_num_levels(element): else: levels[level.level_index] = level - if "0" not in levels and level_without_index is not None: + if level_without_index is not None and level_without_index.level_index not in levels: levels[level_without_index.level_index] = level_without_index return levels -- cgit v1.2.3