MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _remove_daily_note_entry

Function _remove_daily_note_entry

agents/reading-agent/main.py:2076–2084  ·  view source on GitHub ↗
(current: str, marker: str)

Source from the content-addressed store, hash-verified

2074
2075def _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
2086def _prune_empty_daily_note_sections(text: str) -> str:
2087 lines = text.splitlines()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected