Removes the first section between and tags, and returns the remaining text.
(text)
| 492 | |
| 493 | |
| 494 | def remove_first_physical_index_section(text): |
| 495 | """ |
| 496 | Removes the first section between <physical_index_X> and <physical_index_X> tags, |
| 497 | and returns the remaining text. |
| 498 | """ |
| 499 | pattern = r'<physical_index_\d+>.*?<physical_index_\d+>' |
| 500 | match = re.search(pattern, text, re.DOTALL) |
| 501 | if match: |
| 502 | # Remove the first matched section |
| 503 | return text.replace(match.group(0), '', 1) |
| 504 | return text |
| 505 | |
| 506 | ### add verify completeness |
| 507 | def generate_toc_continue(toc_content, part, model=None): |
nothing calls this directly
no outgoing calls
no test coverage detected