| 643 | |
| 644 | |
| 645 | def _report_snippet(body: str) -> str: |
| 646 | for raw_line in body.splitlines(): |
| 647 | line = raw_line.strip() |
| 648 | if not line: |
| 649 | continue |
| 650 | if line.startswith("#"): |
| 651 | continue |
| 652 | line = re.sub(r"^>+\s*", "", line) |
| 653 | line = re.sub(r"^[-*]\s+", "", line) |
| 654 | line = re.sub(r"`([^`]*)`", r"\1", line) |
| 655 | if re.match(r"^[★☆]{2,}.*(?:约\s*\d+\s*分钟|about\s+\d+\s+min)", line, flags=re.IGNORECASE): |
| 656 | continue |
| 657 | if not line: |
| 658 | continue |
| 659 | return line[:240] |
| 660 | return "" |
| 661 | |
| 662 | |
| 663 | def _report_record(path: Path) -> Dict[str, Any]: |