MCPcopy
hub / github.com/Textualize/rich / escape

Function escape

rich/jupyter.py:60–62  ·  view source on GitHub ↗

Escape html.

(text: str)

Source from the content-addressed store, hash-verified

58
59def _render_segments(segments: Iterable[Segment]) -> str:
60 def escape(text: str) -> str:
61 """Escape html."""
62 return text.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
63
64 fragments: List[str] = []
65 append_fragment = fragments.append

Callers 1

_render_segmentsFunction · 0.70

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected