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
611
612def _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
620def _strip_html_markup(text: Any) -> str:

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