MCPcopy Create free account
hub / github.com/pytest-dev/pytest / escape_rst

Function escape_rst

scripts/update-plugin-list.py:38–48  ·  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

36
37
38def escape_rst(text: str) -> str:
39 """Rudimentary attempt to escape special RST characters to appear as
40 plain text."""
41 text = (
42 text.replace("*", "\\*")
43 .replace("<", "\\<")
44 .replace(">", "\\>")
45 .replace("`", "\\`")
46 )
47 text = re.sub(r"_\b", "", text)
48 return text
49
50
51def iter_plugins():

Callers 1

iter_pluginsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected