Skip to content

Commit 5426f15

Browse files
committed
table: don't strip leading whitespace
If the initial contents of a row are spaces (e.g. empty table header or a string with leading whitespace) then the strip() call will remove it and misalign the table. Use rstrip() so we only remove trailing whitespace. Signed-off-by: Stephen Brennan <[email protected]>
1 parent 6c63feb commit 5426f15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drgn_tools/table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def print_table(
3838
"".join(
3939
str(val).ljust(col_width + 2)
4040
for (val, col_width) in zip(entry, col_widths)
41-
).strip(),
41+
).rstrip(),
4242
file=out,
4343
)
4444

0 commit comments

Comments
 (0)