MCPcopy Create free account
hub / github.com/CoopReason/TESSY / _strip_block

Function _strip_block

utils.py:30–37  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

28 pieces.append(text[last_idx:])
29 remaining = "".join(pieces)
30 def _strip_block(m):
31 s = m.group(0)
32 inner = s
33 if inner.startswith("```\n"):
34 inner = inner[4:]
35 if inner.endswith("\n```"):
36 inner = inner[:-4]
37 return inner
38 unlanged_pattern = re.compile(r"```\n[\s\S]*?(?:\n```|$)")
39 processed_remaining = unlanged_pattern.sub(_strip_block, remaining)
40 for i, blk in enumerate(preserved_blocks):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected