mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-12 14:26:49 +01:00
[utils] render_table: Fix character calculation for removing extra gap
without this fix, the column next to delimiter will lack leading spaces on terminal (see https://github.com/yt-dlp/yt-dlp/pull/920#issuecomment-1059914615 for the situation)
This commit is contained in:
parent
d49669acad
commit
1ed7953a74
@ -3485,7 +3485,7 @@ def filter_using_list(row, filterArray):
|
|||||||
extra_gap += 1
|
extra_gap += 1
|
||||||
if delim:
|
if delim:
|
||||||
table = [header_row, [delim * (ml + extra_gap) for ml in max_lens]] + data
|
table = [header_row, [delim * (ml + extra_gap) for ml in max_lens]] + data
|
||||||
table[1][-1] = table[1][-1][:-extra_gap] # Remove extra_gap from end of delimiter
|
table[1][-1] = table[1][-1][:-extra_gap * len(delim)] # Remove extra_gap from end of delimiter
|
||||||
for row in table:
|
for row in table:
|
||||||
for pos, text in enumerate(map(str, row)):
|
for pos, text in enumerate(map(str, row)):
|
||||||
if '\t' in text:
|
if '\t' in text:
|
||||||
|
Loading…
Reference in New Issue
Block a user