(current: str, marker: str)
| 2074 | |
| 2075 | def _remove_daily_note_entry(current: str, marker: str) -> Optional[str]: |
| 2076 | marker_index = current.find(marker) |
| 2077 | if marker_index < 0: |
| 2078 | return None |
| 2079 | next_marker = current.find("\n<!-- paperflow:", marker_index + len(marker)) |
| 2080 | next_section = current.find("\n# ", marker_index + len(marker)) |
| 2081 | candidates = [index for index in (next_marker, next_section) if index >= 0] |
| 2082 | end_index = min(candidates) if candidates else len(current) |
| 2083 | return current[:marker_index].rstrip() + "\n\n" + current[end_index:].lstrip("\n") |
| 2084 | |
| 2085 | |
| 2086 | def _prune_empty_daily_note_sections(text: str) -> str: |
| 2087 | lines = text.splitlines() |
no outgoing calls
no test coverage detected