MCPcopy Create free account
hub / github.com/chubin/cheat.sh / _split_paragraphs

Function _split_paragraphs

lib/postprocessing.py:47–59  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

45 return answer
46
47 def _split_paragraphs(text):
48 answer = []
49 paragraph = ""
50 if isinstance(text, bytes):
51 text = text.decode("utf-8")
52 for line in text.splitlines():
53 if line == "":
54 answer.append(paragraph)
55 paragraph = ""
56 else:
57 paragraph += line + "\n"
58 answer.append(paragraph)
59 return answer
60
61 paragraphs = [
62 p

Callers 1

_filter_by_keywordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected