(text: str)
| 71 | |
| 72 | |
| 73 | def normalize_text(text: str) -> str: |
| 74 | text = text.replace("\r\n", "\n").replace("\r", "\n") |
| 75 | text = RE_HYPHEN_BREAK.sub(r"\1\2", text) |
| 76 | text = RE_SOFT_LINEBREAK.sub(" ", text) |
| 77 | text = RE_MULTI_SPACE.sub(" ", text) |
| 78 | text = RE_MULTI_NL.sub("\n\n", text) |
| 79 | return text.strip() |
| 80 | |
| 81 | |
| 82 | def normalize_line(line: str) -> str: |
no outgoing calls
no test coverage detected