(value: str)
| 378 | |
| 379 | |
| 380 | def _summarize_html(value: str) -> str: |
| 381 | text = value.replace("\\r", " ").replace("\\n", " ") |
| 382 | text = re.sub(r"<[^>]+>", " ", text) |
| 383 | text = re.sub(r"\s+", " ", text).strip() |
| 384 | return text or _first_meaningful_line(value) |
| 385 | |
| 386 | |
| 387 | def _truncate(value: str, limit: int) -> str: |
no test coverage detected