big tabs vs spaces adjust

This commit is contained in:
fanyx 2023-01-13 00:27:41 +01:00
parent b83bfe5687
commit 1f2c44c82d
1 changed files with 150 additions and 146 deletions

View File

@ -30,7 +30,7 @@ def split_to_list(str, length, delim=' '):
return l return l
# build_header using section title # build_header using section title
def build_header(l_title): def build_header(l_title, add_index=false, index_prefix=None):
header = [] header = []
len_title = len(l_title[0]) len_title = len(l_title[0])
@ -49,6 +49,10 @@ def build_header(l_title):
count += 1 count += 1
# lower part # lower part
header.append(' ' * (pad + pad_left) + '\\\\' + '_' * len_border + '//' + ' ' * pad) header.append(' ' * (pad + pad_left) + '\\\\' + '_' * len_border + '//' + ' ' * pad)
# add navigation tag
if add_index == true and index_prefix.length == 1:
pass
else:
header.append(' ' * MAX_WIDTH) header.append(' ' * MAX_WIDTH)
return header return header