MCPcopy
hub / github.com/pytest-dev/pytest / escape_rst

Function escape_rst

scripts/update-plugin-list.py:74–84  ·  view source on GitHub ↗

Rudimentary attempt to escape special RST characters to appear as plain text.

(text: str)

Source from the content-addressed store, hash-verified

72
73
74def escape_rst(text: str) -> str:
75 """Rudimentary attempt to escape special RST characters to appear as
76 plain text."""
77 text = (
78 text.replace("*", "\\*")
79 .replace("<", "\\<")
80 .replace(">", "\\>")
81 .replace("`", "\\`")
82 )
83 text = re.sub(r"_\b", "", text)
84 return text
85
86
87def project_response_with_refresh(

Callers 1

iter_pluginsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected