[BUG] tables crop content with long words #3904
-
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 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
https://rich.readthedocs.io/en/latest/console.html#overflow |
Beta Was this translation helpful? Give feedback.
-
|
Found
However in column options it is not documented. |
Beta Was this translation helpful? Give feedback.
-
|
OK, I see, there is an API reference, which is more complete. |
Beta Was this translation helpful? Give feedback.
https://rich.readthedocs.io/en/latest/console.html#overflow
https://rich.readthedocs.io/en/latest/reference/table.html#rich.table.Table.add_column