MCPcopy
hub / github.com/Textualize/rich / highlight

Method highlight

examples/rainbow.py:14–16  ·  view source on GitHub ↗
(self, text)

Source from the content-addressed store, hash-verified

12
13class RainbowHighlighter(Highlighter):
14 def highlight(self, text):
15 for index in range(len(text)):
16 text.stylize(f"color({randint(16, 255)})", index, index + 1)
17
18
19rainbow = RainbowHighlighter()

Callers

nothing calls this directly

Calls 1

stylizeMethod · 0.80

Tested by

no test coverage detected