Method: rich.text.Text.__rich_measure__
Calls: 1124, Exceptions: 0, Paths: 1Back
Path 1: 1124 calls (1.0)
Console (1124)
ConsoleOptions (1121) 80 (3)
Measurement (1124)
1def __rich_measure__(
2 self, console: "Console", options: "ConsoleOptions"
3 ) -> Measurement:
4 text = self.plain
5 lines = text.splitlines()
6 max_text_width = max(cell_len(line) for line in lines) if lines else 0
7 words = text.split()
8 min_text_width = (
9 max(cell_len(word) for word in words) if words else max_text_width
10 )
11 return Measurement(min_text_width, max_text_width)