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

[BUG] Print's options don't work with Text, but they do with str #1689

Closed
fernandoenzo opened this issue Nov 14, 2021 · 1 comment · Fixed by #1697
Closed

[BUG] Print's options don't work with Text, but they do with str #1689

fernandoenzo opened this issue Nov 14, 2021 · 1 comment · Fixed by #1697

Comments

@fernandoenzo
Copy link

Simple code:

from rich.text import Text
from rich import print

a = Text('aa', end='')
b = Text('bb', end='')
print(a, b, sep=' potatoes ', end='\n\n')

Should output:

aa potatoes bb


The actual output:

aabb

If you use str rather than Text, then it works properly.

@fernandoenzo fernandoenzo changed the title [BUG] Print's options doesn't work with Text, but they do with str [BUG] Print's options don't work with Text, but they do with str Nov 14, 2021
@github-actions
Copy link

Did I solve your problem?

Consider sponsoring the ongoing work on Rich and Textual.

Or buy me a coffee to say thanks.

Will McGugan

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Nov 23, 2021
10.14.0

Fixed

Fixed progress speed not updating when total doesn't change
Fixed superfluous new line in Status Textualize/rich#1662
Fixed Windows legacy width again
Fixed infinite loop in set_cell_size Textualize/rich#1682

Added

Added file protocol to URL highlighter Textualize/rich#1681
Added rich.protocol.rich_cast

Changed

Allowed __rich__ to work recursively
Allowed Text classes to work with sep in print Textualize/rich#1689
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant