astanin / python-tabulate

Pretty-print tabular data in Python, a library and a command-line utility. Repository migrated from bitbucket.org/astanin/python-tabulate.
https://pypi.org/project/tabulate/
MIT License
2.08k stars 162 forks source link

fix bugs when cell has ansi #302

Open inisis opened 8 months ago

inisis commented 8 months ago

Hi, when maxcolwidths is set, and cell has ansi decorated, ValueError will be raised.
ValueError: invalid literal for int() with base 10: '\x1b[32m44\x1b[37m'

this pr helps fix it.