(self, before, now, after)
| 547 | } |
| 548 | |
| 549 | def _is_block_separator(self, before, now, after): |
| 550 | if ( |
| 551 | re.match("//////+", before) |
| 552 | and re.match(r"//+\s+[0-9]+\.", now) |
| 553 | and re.match(r"\s*", after) |
| 554 | ): |
| 555 | block_name = re.sub(r"//+\s+[0-9]+\.\s*", "", now) |
| 556 | block_name = "_".join(block_name.strip(", ").split()) |
| 557 | for k in self._replace_with: |
| 558 | if k in block_name: |
| 559 | block_name = self._replace_with[k] |
| 560 | return block_name |
| 561 | return None |
| 562 | |
| 563 | @staticmethod |
| 564 | def _cut_block(block, start_block=False): |