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] unexpected colored if there's hyphen with number behind #3306

Closed
2 tasks done
nofacer opened this issue Mar 21, 2024 · 3 comments
Closed
2 tasks done

[BUG] unexpected colored if there's hyphen with number behind #3306

nofacer opened this issue Mar 21, 2024 · 3 comments

Comments

@nofacer
Copy link

nofacer commented Mar 21, 2024

Describe the bug
If there's number after hyphen it will be colored even I've escaped it.

from rich.console import Console
from rich.markup import escape

Console().rule(f"[on black]{escape('A-2')}[/on black]")
Console().rule(f"[on black]{escape('A2')}[/on black]")
Console().rule(f"[on black]{escape('A-A')}[/on black]")

image

Platform
Windows, rich==13.7.1

Copy link

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

@nofacer
Copy link
Author

nofacer commented Mar 21, 2024

disable highlight solves this highlight=False

@nofacer nofacer closed this as completed Mar 21, 2024
Copy link

I hope we solved your problem.

If you like using Rich, you might also enjoy Textual

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

No branches or pull requests

1 participant