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

[FR] Support ANSI color codes #65

Open
NightMachinery opened this issue Mar 16, 2021 · 1 comment
Open

[FR] Support ANSI color codes #65

NightMachinery opened this issue Mar 16, 2021 · 1 comment

Comments

@NightMachinery
Copy link

I am using this package to be able to use my terminal in the rare cases where some RTL text is involved. I currently have this script:

#!/usr/bin/env python3

import arabic_reshaper
import sys
from bidi.algorithm import get_display

text_to_be_reshaped = sys.stdin.read()
reshaped_text = arabic_reshaper.reshape(text_to_be_reshaped)
bidi_text = get_display(reshaped_text)
print(bidi_text, end='')

And it works great:
image

But it would be even more awesome if it could support ANSI color codes:
image

@mpcabd
Copy link
Owner

mpcabd commented Mar 23, 2021

I am not sure this problem is by the reshaper or by the fact that get_display is called on the text, could you write a unit test that fails with this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants