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

Method find_section

scripts/tests/test_postprocess.py:168–175  ·  view source on GitHub ↗
(secs, title)

Source from the content-addressed store, hash-verified

166 """pipe-2:在前面插入新标题导致 heading seq 漂移、anchor 变,但 title 不变
167 → 章节摘要应按 title fallback 回填,不被静默丢弃。"""
168 def find_section(secs, title):
169 for s in secs:
170 if s["title"] == title:
171 return s
172 r = find_section(s.get("children", []), title)
173 if r:
174 return r
175 return None
176
177 text1, outline1 = process(
178 "# Intro\n\nbody.\n\n## Deep Dive\n\ndetail.\n", "t.md"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected