(text: Any)
| 610 | |
| 611 | |
| 612 | def _clean_text(text: Any) -> str: |
| 613 | normalized = str(text or "") |
| 614 | normalized = normalized.replace("\r\n", "\n").replace("\r", "\n") |
| 615 | normalized = re.sub(r"\n{3,}", "\n\n", normalized) |
| 616 | normalized = re.sub(r"[ \t]+", " ", normalized) |
| 617 | return normalized.strip() |
| 618 | |
| 619 | |
| 620 | def _strip_html_markup(text: Any) -> str: |
no outgoing calls
no test coverage detected