Method: rich.highlighter.RegexHighlighter.highlight
Calls: 469, Exceptions: 0, Paths: 1Back
Path 1: 469 calls (1.0)
Text (469)
1def highlight(self, text: Text) -> None:
2 """Highlight :class:`rich.text.Text` using regular expressions.
3
4 Args:
5 text (~Text): Text to highlighted.
6
7 """
8
9 highlight_regex = text.highlight_regex
10 for re_highlight in self.highlights:
11 highlight_regex(re_highlight, style_prefix=self.base_style)