(self, text: str, **markup: bool)
| 105 | return wcswidth(self._current_line) |
| 106 | |
| 107 | def markup(self, text: str, **markup: bool) -> str: |
| 108 | for name in markup: |
| 109 | if name not in self._esctable: |
| 110 | raise ValueError(f"unknown markup: {name!r}") |
| 111 | if self.hasmarkup: |
| 112 | esc = [self._esctable[name] for name, on in markup.items() if on] |
| 113 | if esc: |
| 114 | text = "".join(f"\x1b[{cod}m" for cod in esc) + text + "\x1b[0m" |
| 115 | return text |
| 116 | |
| 117 | def sep( |
| 118 | self, |
no test coverage detected