Skip to content

Terminal.wrap drops color escape sequence #351

@grayjk

Description

@grayjk
import blessed

t = blessed.Terminal()

test = f"{t.blue('a'*10)} {t.blue('b'*10)}"
print('\n'.join(t.wrap(test, width=15)))

When the code above prints, the 'b' string is not printed in blue but should be. The blue escape is dropped

The code wraps correctly in blessed 1.25 but fails starting in 1.26. Fails with 1.29 as well

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions