From 850b9db6d6363add03beab91c48d9e027a7a3652 Mon Sep 17 00:00:00 2001 From: xenofem Date: Tue, 23 Apr 2024 21:37:51 -0400 Subject: [PATCH] allow alphabetic numbering with no higher-level numeric numbering --- dlibrary/dlibrary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlibrary/dlibrary.py b/dlibrary/dlibrary.py index 5f0b489..223ed45 100755 --- a/dlibrary/dlibrary.py +++ b/dlibrary/dlibrary.py @@ -894,7 +894,7 @@ def unique_hierarchical_prefix_numbering(entries, start_point=0): if not next_match: return None next_layer_start = pos + next_match.end() - sub_numbering = unique_hierarchical_prefix_numbering(ents_idx, start_point=next_layer_start) or alphabetic_numbering(ents_idx, next_layer_start) + sub_numbering = unique_hierarchical_prefix_numbering(ents_idx, start_point=next_layer_start) if not sub_numbering: return None for sub_idx in sub_numbering: @@ -902,7 +902,7 @@ def unique_hierarchical_prefix_numbering(entries, start_point=0): return numbering - return None + return alphabetic_numbering(entries, start_point) def alphabetic_numbering(entries, start_point): debug(f'Finding alphabetic numbering from start point {start_point} for {entries}')