Return the input string without non-functional spaces or newlines.
(rendered: str)
| 363 | |
| 364 | |
| 365 | def normalize(rendered: str) -> str: |
| 366 | """Return the input string without non-functional spaces or newlines.""" |
| 367 | out = "".join([line.strip() for line in rendered.splitlines() if line.strip()]) |
| 368 | out = out.replace(", ", ",") |
| 369 | return out |
| 370 | |
| 371 | |
| 372 | @contextmanager |
no outgoing calls