You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When rendering a multiline Text made up of only spaces, Rich fails to measure its width. It seems that Rich will use the sum of each line's width rather than the maximum of them.
To Reproduce
from rich import print
from rich.panel import Panel
from rich.text import Text
print(Panel.fit(Text(' \n \n ', style = 'on green'), padding = 0))
Instead of rendering a panel of width 3, it turns out 6. As long as the Text contains non-whitespace characters, this phenomenon disappears.
Platform
I tried it on both windows 7/10 cmd and default terminal in linux, and encountered the same problem.
The text was updated successfully, but these errors were encountered:
Describe the bug
When rendering a multiline Text made up of only spaces, Rich fails to measure its width. It seems that Rich will use the sum of each line's width rather than the maximum of them.
To Reproduce
Instead of rendering a panel of width 3, it turns out 6. As long as the Text contains non-whitespace characters, this phenomenon disappears.
Platform
I tried it on both windows 7/10 cmd and default terminal in linux, and encountered the same problem.
The text was updated successfully, but these errors were encountered: