| 251 | return lines.map(function(entry) { return ' ' + entry; }); |
| 252 | } |
| 253 | function eofNL(curRange, i, current) { |
| 254 | var last = diff[diff.length-2], |
| 255 | isLast = i === diff.length-2, |
| 256 | isLastOfType = i === diff.length-3 && (current.added === !last.added || current.removed === !last.removed); |
| 257 | |
| 258 | // Figure out if this is the last line for the given file and missing NL |
| 259 | if (!/\n$/.test(current.value) && (isLast || isLastOfType)) { |
| 260 | curRange.push('\\ No newline at end of file'); |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | var oldRangeStart = 0, newRangeStart = 0, curRange = [], |
| 265 | oldLine = 1, newLine = 1; |