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

Function section_name_for_line

scripts/lint_note.py:485–492  ·  view source on GitHub ↗
(lines: list[str], line_index: int)

Source from the content-addressed store, hash-verified

483
484
485def section_name_for_line(lines: list[str], line_index: int) -> str:
486 current_section = ""
487 for idx in range(0, line_index + 1):
488 stripped = lines[idx].strip()
489 match = re.match(r"^##\s+(.+)$", stripped)
490 if match:
491 current_section = match.group(1).strip()
492 return current_section
493
494
495def subsection_name_for_line(lines: list[str], line_index: int) -> str:

Callers 2

mixed_language_issuesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected