(a, b)
| 156 | } |
| 157 | |
| 158 | function compareClipped(a, b) { |
| 159 | a = a.split("\n") |
| 160 | b = b.split("\n") |
| 161 | if (a.length != b.length) return false |
| 162 | for (let i = 0; i < a.length; ++i) { |
| 163 | let len = Math.max(0, a[i].length - 1) |
| 164 | if (a[i].slice(0, len) != b[i].slice(0, len)) return false |
| 165 | } |
| 166 | return true |
| 167 | } |
| 168 | |
| 169 | function compareJoined(a, b) { |
| 170 | return a.replace(/\n\s*/g, " ").trim() == b.replace(/\n\s*/g, " ").trim() |