mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 10:08:40 +00:00
prompt fix
This commit is contained in:
parent
077acd5bea
commit
70d43d7c92
15 changed files with 141 additions and 91 deletions
|
@ -13,7 +13,7 @@ from rich.highlighter import Highlighter
|
|||
class RainbowHighlighter(Highlighter):
|
||||
def highlight(self, text):
|
||||
for index in range(len(text)):
|
||||
text.stylize(index, index + 1, str(randint(16, 255)))
|
||||
text.stylize(str(randint(16, 255)), index, index + 1)
|
||||
|
||||
|
||||
rainbow = RainbowHighlighter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue