From b83bfe56872df3343b9a6ae4f77b11b794af1b9d Mon Sep 17 00:00:00 2001 From: fanyx Date: Fri, 13 Jan 2023 00:20:38 +0100 Subject: [PATCH] Switch to dynamic length padding for index numbers --- build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.py b/build.py index 29ecee9..d5d07d4 100755 --- a/build.py +++ b/build.py @@ -60,7 +60,7 @@ def build_index(yaml, prefix): l_index = [] 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]