MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / section_body

Function section_body

scripts/lint_note.py:1230–1239  ·  view source on GitHub ↗
(text: str, heading: str)

Source from the content-addressed store, hash-verified

1228
1229
1230def section_body(text: str, heading: str) -> str:
1231 pattern = rf"^##\s+{re.escape(heading)}\s*$"
1232 match = re.search(pattern, text, flags=re.MULTILINE)
1233 if not match:
1234 return ""
1235 start = match.end()
1236 next_match = re.search(r"^##\s+.+$", text[start:], flags=re.MULTILINE)
1237 if not next_match:
1238 return text[start:]
1239 return text[start : start + next_match.start()]
1240
1241
1242def subsection_body(text: str, section_heading: str, subsection_heading: str) -> str:

Callers 4

subsection_bodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected