mirror of
https://github.com/KevinMidboe/tableprint.git
synced 2025-10-29 18:00:16 +00:00
Fixes ANSI escape in headers
This commit is contained in:
@@ -132,7 +132,7 @@ def header(headers, width=WIDTH, style=STYLE, add_hr=True):
|
||||
tablestyle = styles[style]
|
||||
|
||||
# string formatter
|
||||
data = map(lambda x: ('{:^%d}' % width).format(x), headers)
|
||||
data = map(lambda x: ('{:^%d}' % (width + _ansi_len(x))).format(x), headers)
|
||||
|
||||
# build the formatted str
|
||||
headerstr = _format_line(data, tablestyle.row)
|
||||
|
||||
Reference in New Issue
Block a user