(raw)
| 15771 | return _extract_text_scalar(value) |
| 15772 | |
| 15773 | def _strip_html(raw): |
| 15774 | if not isinstance(raw, str): |
| 15775 | return "" |
| 15776 | t = raw.replace("\r\n", "\n").replace("\r", "\n") |
| 15777 | t = re.sub(r"<\s*br\s*/?>", "\n", t, flags=re.IGNORECASE) |
| 15778 | t = re.sub(r"<[^>]+>", "", t) |
| 15779 | t = re.sub(r"\s+\n", "\n", t) |
| 15780 | t = re.sub(r"\n{3,}", "\n\n", t) |
| 15781 | return t.strip() |
| 15782 | |
| 15783 | def _as_str(v): |
| 15784 | if v is None: |
nothing calls this directly
no outgoing calls
no test coverage detected