This commit is contained in:
Paul Gauthier 2023-05-19 09:14:55 -07:00
parent 6900e7a282
commit 9536a8d1b9

View file

@ -25,8 +25,12 @@ def get_tags_map(filenames, root_dname=None):
tab = " "
for tag in tags:
tag = list(tag)
common_prefix = [tag_i for tag_i, last_i in zip(tag, last) if tag_i == last_i]
num_common = len(common_prefix)
for i in range(len(last)):
if last[i] != tag[i]:
break
num_common = i
indent = tab * num_common
rest = tag[num_common:]
for item in rest: