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

Function subsection_name_for_line

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

Source from the content-addressed store, hash-verified

493
494
495def subsection_name_for_line(lines: list[str], line_index: int) -> str:
496 current_subsection = ""
497 for idx in range(0, line_index + 1):
498 stripped = lines[idx].strip()
499 if re.match(r"^##\s+.+$", stripped):
500 current_subsection = ""
501 continue
502 match = re.match(r"^###\s+(.+)$", stripped)
503 if match:
504 current_subsection = match.group(1).strip()
505 return current_subsection
506
507
508def mixed_language_issues(text: str) -> list[dict[str, object]]:

Callers 2

mixed_language_issuesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected