MCPcopy
hub / github.com/mitmproxy/mitmproxy / indent_text

Function indent_text

mitmproxy/contentviews/_view_xml_html.py:133–140  ·  view source on GitHub ↗
(data: str, prefix: str)

Source from the content-addressed store, hash-verified

131
132
133def indent_text(data: str, prefix: str) -> str:
134 # Add spacing to first line so that we dedent in cases like this:
135 # <li>This is
136 # example text
137 # over multiple lines
138 # </li>
139 dedented = textwrap.dedent(" " * 32 + data).strip()
140 return textwrap.indent(dedented, prefix[:32])
141
142
143def is_inline_text(a: Token | None, b: Token | None, c: Token | None) -> bool:

Callers 1

format_xmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…