Switch to dynamic length padding for index numbers

This commit is contained in:
fanyx 2023-01-13 00:20:38 +01:00
parent bdd6f37118
commit b83bfe5687
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ def build_index(yaml, prefix):
l_index = [] l_index = []
for i, item in enumerate(l_title): for i, item in enumerate(l_title):
l_index += [' - ' + item.ljust(MAX_WIDTH - 10) + f'[{prefix}{i+1}00] '] l_index += [' - ' + item.ljust(MAX_WIDTH - 10) + f'[{prefix}{i+1:03}] ']
l_index += [' ' * MAX_WIDTH] l_index += [' ' * MAX_WIDTH]