Append `a:r` and `a:br` elements to `p` based on `text`. Any `\n` or `\v` (vertical-tab) characters in `text` delimit `a:r` (run) elements and themselves are translated to `a:br` (line-break) elements. The vertical-tab character appears in clipboard text from PowerPoint at "
(self, text: str)
| 423 | return r |
| 424 | |
| 425 | def append_text(self, text: str): |
| 426 | """Append `a:r` and `a:br` elements to `p` based on `text`. |
| 427 | |
| 428 | Any `\n` or `\v` (vertical-tab) characters in `text` delimit `a:r` (run) elements and |
| 429 | themselves are translated to `a:br` (line-break) elements. The vertical-tab character |
| 430 | appears in clipboard text from PowerPoint at "soft" line-breaks (new-line, but not new |
| 431 | paragraph). |
| 432 | """ |
| 433 | for idx, r_str in enumerate(re.split("\n|\v", text)): |
| 434 | # ---breaks are only added _between_ items, not at start--- |
| 435 | if idx > 0: |
| 436 | self.add_br() |
| 437 | # ---runs that would be empty are not added--- |
| 438 | if r_str: |
| 439 | self.add_r(r_str) |
| 440 | |
| 441 | @property |
| 442 | def content_children(self) -> tuple[CT_RegularTextRun | CT_TextLineBreak | CT_TextField, ...]: |