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

Function is_exempt_line

scripts/lint_note.py:463–482  ·  view source on GitHub ↗
(line: str)

Source from the content-addressed store, hash-verified

461
462
463def is_exempt_line(line: str) -> bool:
464 stripped = line.strip()
465 if not stripped:
466 return True
467 if stripped.startswith("#"):
468 return True
469 if is_metadata_line(stripped):
470 return True
471 if (
472 stripped.startswith("> [!figure]")
473 or stripped.startswith("> 建议位置:")
474 or stripped.startswith("> 放置原因:")
475 or stripped.startswith("> 当前状态:")
476 ):
477 return True
478 if re.search(r"https?://", stripped):
479 return True
480 if re.search(r"`10\.\d{4,9}/", stripped):
481 return True
482 return False
483
484
485def section_name_for_line(lines: list[str], line_index: int) -> str:

Callers 1

mixed_language_issuesFunction · 0.85

Calls 1

is_metadata_lineFunction · 0.85

Tested by

no test coverage detected