allow alphabetic numbering with no higher-level numeric numbering

This commit is contained in:
xenofem 2024-04-23 21:37:51 -04:00
parent b26a854bdb
commit 850b9db6d6

View file

@ -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}')