(doc, start, end)
| 6441 | // Get the part of a document between two positions, as an array of |
| 6442 | // strings. |
| 6443 | function getBetween(doc, start, end) { |
| 6444 | var out = [], n = start.line; |
| 6445 | doc.iter(start.line, end.line + 1, function(line) { |
| 6446 | var text = line.text; |
| 6447 | if (n == end.line) text = text.slice(0, end.ch); |
| 6448 | if (n == start.line) text = text.slice(start.ch); |
| 6449 | out.push(text); |
| 6450 | ++n; |
| 6451 | }); |
| 6452 | return out; |
| 6453 | } |
| 6454 | // Get the lines between from and to, as array of strings. |
| 6455 | function getLines(doc, from, to) { |
| 6456 | var out = []; |
no test coverage detected