-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[REQUEST] support multiple chars for rule printing #204
Comments
I will also remember add tests for this (if accepted) of course |
Hi @hedythedev Works for me. Since we allow multiple characters now, it should probably take in to account multi-cell characters like emoji. See the functions in cells.py for help with that. The name of the parameter is probably wrong now. BTW there is a rule method on the Console class that will also need updating... Thanks! |
Got it! Also would |
Just meant its a good idea in general.
It is, but I dislike abbreviations. I'd rather type it in full than recall how it was abbreviated... |
So if the characters provided have a long length, this might end up happening ( >>> console.print(Rule("hello", character="12345"))
|12345 hello 12345 |
# ^^^^ Because So in this case, which solution would we want?
In my opinion we should use truncate |
The Rule should extend to the full width available, which may mean you need an extra character on the right hand side. To use your example:
|
Have you checked the issues for a similar suggestions? Yes
How would you improve Rich?
Currently for rule.py it only allows the character to have 1 cell length, it would better if it could allow more, like
What problem does it solved for you?
I was just thinking it would improve it and it looks like an ASCII rule, which is cool (like this program)
If this is accepted, I would like to work on it, because I have already tried it out ”locally” (https://repl.it/@hedythedev/rich#rich/rule.py) and it works well
The text was updated successfully, but these errors were encountered: