Add literal text to the output.
(self, obj)
| 232 | self._break_one_group(group) |
| 233 | |
| 234 | def text(self, obj): |
| 235 | """Add literal text to the output.""" |
| 236 | width = len(obj) |
| 237 | if self.buffer: |
| 238 | text = self.buffer[-1] |
| 239 | if not isinstance(text, Text): |
| 240 | text = Text() |
| 241 | self.buffer.append(text) |
| 242 | text.add(obj, width) |
| 243 | self.buffer_width += width |
| 244 | self._break_outer_groups() |
| 245 | else: |
| 246 | self.output.write(obj) |
| 247 | self.output_width += width |
| 248 | |
| 249 | def breakable(self, sep=' '): |
| 250 | """ |
no test coverage detected