Remove Scholar / homepage URLs from bootstrap text and normalize whitespace.
(text: Any)
| 1185 | |
| 1186 | |
| 1187 | def strip_bootstrap_urls(text: Any) -> str: |
| 1188 | """Remove Scholar / homepage URLs from bootstrap text and normalize whitespace.""" |
| 1189 | stripped = GOOGLE_SCHOLAR_URL_RE.sub(" ", str(text or ""), count=1) |
| 1190 | stripped = GENERIC_HTTP_URL_RE.sub(" ", stripped, count=1) |
| 1191 | return first_meaningful_line(re.sub(r"\s+", " ", stripped)).strip() |
| 1192 | |
| 1193 | |
| 1194 | def detect_expand_push_request(text: Any) -> Optional[Dict[str, Any]]: |
no test coverage detected