MCPcopy Create free account
hub / github.com/IENT/YUView / cleanArgument

Function cleanArgument

tools/standardTextToCode/parseTables.py:38–47  ·  view source on GitHub ↗
(text : str)

Source from the content-addressed store, hash-verified

36 raise SyntaxError("There still is a char to replace in the condition. This must be cleaned up first.")
37 return text
38def cleanArgument(text : str):
39 text = text.strip()
40 text = text.replace("[\xa0", "[")
41 text = text.replace("\xa0]", "]")
42 text = text.replace("\xa0", " ")
43 text = text.replace("\u2212", "-")
44 text = text.replace('−', '-')
45 if (text.find("\xa0") != -1):
46 raise SyntaxError("There still is a char to replace in the argument. This must be cleaned up first.")
47 return text
48def cleanComment(text : str):
49 text = text.strip()
50 text = text.replace("=\xa0=", "==")

Callers 2

fromTextMethod · 0.85
fromTextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected