Add literal text to the output.
(self, obj)
| 214 | self._break_one_group(group) |
| 215 | |
| 216 | def text(self, obj): |
| 217 | """Add literal text to the output.""" |
| 218 | width = len(obj) |
| 219 | if self.buffer: |
| 220 | text = self.buffer[-1] |
| 221 | if not isinstance(text, Text): |
| 222 | text = Text() |
| 223 | self.buffer.append(text) |
| 224 | text.add(obj, width) |
| 225 | self.buffer_width += width |
| 226 | self._break_outer_groups() |
| 227 | else: |
| 228 | self.output.write(obj) |
| 229 | self.output_width += width |
| 230 | |
| 231 | def breakable(self, sep=' '): |
| 232 | """ |