MCPcopy Create free account
hub / github.com/Qinbf/groundmap / find_section_by_anchor

Function find_section_by_anchor

scripts/section_parser.py:344–349  ·  view source on GitHub ↗
(sections: list[Section], anchor: str)

Source from the content-addressed store, hash-verified

342
343
344def find_section_by_anchor(sections: list[Section], anchor: str) -> Optional[Section]:
345 target = anchor.lstrip("^")
346 for s in flatten_sections(sections):
347 if s.anchor == target:
348 return s
349 return None
350
351
352def find_section_by_title(sections: list[Section], title: str) -> Optional[Section]:

Callers 1

Calls 1

flatten_sectionsFunction · 0.85

Tested by 1