MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _strip_html_markup

Function _strip_html_markup

agents/reading-agent/main.py:620–627  ·  view source on GitHub ↗
(text: Any)

Source from the content-addressed store, hash-verified

618
619
620def _strip_html_markup(text: Any) -> str:
621 normalized = unescape(str(text or ""))
622 normalized = re.sub(r"(?i)<br\s*/?>", "\n", normalized)
623 normalized = re.sub(r"(?i)</p\s*>", "\n", normalized)
624 normalized = re.sub(r"(?i)<p\b[^>]*>", "", normalized)
625 normalized = re.sub(r"<[^>]+>", " ", normalized)
626 normalized = normalized.replace("\xa0", " ")
627 return _clean_text(normalized)
628
629
630def _looks_like_feed_metadata_abstract(text: Any) -> bool:

Callers 2

_clean_abstract_textFunction · 0.85

Calls 1

_clean_textFunction · 0.70

Tested by

no test coverage detected