[BUG] tables crop content with long words #3904
Answered
by
willmcgugan
greatvovan
asked this question in
Q&A
Describe the bug Long words that did not fit into a narrow cell are cropped instead of wrapping. from rich.console import Console
from rich.table import Table
table = Table(width=30)
table.add_column("No")
table.add_column("Text")
table.add_row("1", "com company collections styles examples unicorn")
table.add_row("2", "com.company.collections.styles.examples.unicorn")
table.add_row("3", "wrap wrap wrap com.company.collections.styles.examples.unicorn")
console = Console()
console.print(table)Output: I think, we never should trim content unless instructed by a special parameter. Probably we should also add a special character like |
Answered by
willmcgugan
Dec 3, 2025
Replies: 3 comments
|
https://rich.readthedocs.io/en/latest/console.html#overflow |
0 replies
Answer selected by
greatvovan
|
Found
However in column options it is not documented. |
0 replies
|
OK, I see, there is an API reference, which is more complete. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://rich.readthedocs.io/en/latest/console.html#overflow
https://rich.readthedocs.io/en/latest/reference/table.html#rich.table.Table.add_column