(text: str)
| 126 | |
| 127 | |
| 128 | def cleanup_markdown_text(text: str) -> str: |
| 129 | cleaned_lines = [] |
| 130 | for line in strip_html_comments(text).replace("\r\n", "\n").splitlines(): |
| 131 | line = line.strip() |
| 132 | if not line: |
| 133 | continue |
| 134 | line = re.sub(r"^[-*+]\s*", "", line) |
| 135 | line = re.sub(r"^\d+\.\s*", "", line) |
| 136 | cleaned_lines.append(line) |
| 137 | return normalize_whitespace(" ".join(cleaned_lines)) |
| 138 | |
| 139 | |
| 140 | def cleanup_title(title: str) -> str: |
no test coverage detected