(run: string)
| 92 | |
| 93 | const parts = oldLF.match(/(\s+|\S+)/g) ?? [] |
| 94 | const whitespacePatternForRun = (run: string): string => { |
| 95 | // If the whitespace run includes a newline, allow matching any whitespace (including newlines) |
| 96 | // to tolerate wrapping changes across lines. |
| 97 | if (run.includes("\n")) { |
| 98 | return "\\s+" |
| 99 | } |
| 100 | |
| 101 | // Otherwise, limit matching to horizontal whitespace so we don't accidentally consume |
| 102 | // line breaks that precede indentation. |
| 103 | return "[\\t ]+" |
| 104 | } |
| 105 | |
| 106 | const pattern = parts |
| 107 | .map((part) => { |
no outgoing calls
no test coverage detected