(self)
| 97 | self.merge_text() |
| 98 | |
| 99 | def merge_text(self): |
| 100 | # log.debug("Merging text nodes") |
| 101 | if self.current_text: |
| 102 | t1: bk.Text |
| 103 | if self.in_collapsible_group: |
| 104 | new_text = "\n\n".join(t1.content for t1 in self.current_text) |
| 105 | self.current_state.append(bk.Text(new_text)) |
| 106 | else: |
| 107 | self.current_state.extend(copy(t1) for t1 in self.current_text) |
| 108 | self.current_text = [] |
| 109 | |
| 110 | @property |
| 111 | def root(self) -> BaseBlock: |