MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / untab

Function untab

main.py:158–163  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

156
157
158def untab(text):
159 lines = text.strip("\n").split("\n")
160 if not all([x.startswith(" ") or x == "" for x in lines]):
161 return "\n".join(lines)
162
163 return "\n".join([x[4:] if len(x) >= 4 else "" for x in lines])
164
165
166def init_tutorials():

Callers 1

init_tutorialsFunction · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected