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

Function _clean_text

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

Source from the content-addressed store, hash-verified

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

Callers 15

_parse_publish_monthFunction · 0.70
_safe_filenameFunction · 0.70
_paper_file_stemFunction · 0.70
_paper_title_file_stemFunction · 0.70
_strip_html_markupFunction · 0.70
_clean_abstract_textFunction · 0.70
_clean_pdf_evidence_textFunction · 0.70
_truncate_textFunction · 0.70
_first_non_emptyFunction · 0.70
_append_analysis_noteFunction · 0.70
_describe_pdf_fallbackFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected