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

Function match_section_heading

scripts/common.py:1730–1739  ·  view source on GitHub ↗
(line: str)

Source from the content-addressed store, hash-verified

1728
1729
1730def match_section_heading(line: str) -> str | None:
1731 normalized = normalize_heading(line)
1732 if not normalized:
1733 return None
1734 if normalized in STOP_SECTION_ALIASES:
1735 return "stop"
1736 for section, aliases in SECTION_ALIASES.items():
1737 if normalized in aliases:
1738 return section
1739 return None
1740
1741
1742def stop_section_reason(line: str, *, allow_prefix: bool = False) -> str:

Calls 1

normalize_headingFunction · 0.85