Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maxcolwidths is broken with fancy_outline #355

Open
yurivict opened this issue Nov 14, 2024 · 0 comments
Open

maxcolwidths is broken with fancy_outline #355

yurivict opened this issue Nov 14, 2024 · 0 comments

Comments

@yurivict
Copy link

This testcase:

from tabulate import tabulate

headers = ['Header#1', 'Header#2', 'Header#3']
data = []
data.append(['Alpha beta gama zeta omega', 'The weather was exceptionally good that day again', 'The files were concatenated and archived for posterity.'])
data.append(['Delta omega beta alpha nu and the rest', 'The weather was exceptionally good that day', 'They decided to engage in many businesses and all of them were successful.'])

print(tabulate(
    data,
    headers=headers,
    tablefmt='fancy_outline',
    maxcolwidths=[None, None, 8]))

produces this output:

╒════════════════════════════════════════╤═══════════════════════════════════════════════════╤═══════════════════════════════════════════════════════════════════════════════╕
│ Header#1                               │ Header#2                                          │ Header#3                                                                      │
╞════════════════════════════════════════╪═══════════════════════════════════════════════════╪═══════════════════════════════════════════════════════════════════════════════╡
│ Alpha beta gama zeta omega             │ The weather was exceptionally good that day again │ The
files
were con
catenate
d and
archived
for post
erity.                    │
│ Delta omega beta alpha nu and the rest │ The weather was exceptionally good that day       │ They
decided
to
engage
in many 
business
es and
all of
them
were suc
cessful. │
╘════════════════════════════════════════╧═══════════════════════════════════════════════════╧═══════════════════════════════════════════════════════════════════════════════╛
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant