| 1216 | |
| 1217 | |
| 1218 | def _audit_scan_synopsis_no_spaces_run( |
| 1219 | markdown: str, html: str |
| 1220 | ) -> list[tuple[int, str]]: |
| 1221 | hits: list[tuple[int, str]] = [] |
| 1222 | in_synopsis = False |
| 1223 | for line_no, line in enumerate(markdown.splitlines(), 1): |
| 1224 | stripped = line.strip() |
| 1225 | if stripped.startswith("#"): |
| 1226 | in_synopsis = bool(_AUDIT_SYNOPSIS_HEADING_RE.match(stripped)) |
| 1227 | continue |
| 1228 | if in_synopsis and len(line) > 200 and not _AUDIT_WHITESPACE_RE.search(line): |
| 1229 | hits.append((line_no, line[:80] + "...")) |
| 1230 | return hits |
| 1231 | |
| 1232 | |
| 1233 | AUDIT_RULES: list[tuple[str, AuditScanner, str]] = [ |