MCPcopy
hub / github.com/HisMax/RedInk / _summarize_html

Function _summarize_html

backend/errors.py:380–384  ·  view source on GitHub ↗
(value: str)

Source from the content-addressed store, hash-verified

378
379
380def _summarize_html(value: str) -> str:
381 text = value.replace("\\r", " ").replace("\\n", " ")
382 text = re.sub(r"<[^>]+>", " ", text)
383 text = re.sub(r"\s+", " ", text).strip()
384 return text or _first_meaningful_line(value)
385
386
387def _truncate(value: str, limit: int) -> str:

Callers 2

_summarize_rawFunction · 0.85

Calls 1

_first_meaningful_lineFunction · 0.85

Tested by

no test coverage detected