(line: str)
| 461 | |
| 462 | |
| 463 | def 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 | |
| 485 | def section_name_for_line(lines: list[str], line_index: int) -> str: |
no test coverage detected