(doc, start, end)
| 7806 | // Get the part of a document between two positions, as an array of |
| 7807 | // strings. |
| 7808 | function getBetween(doc, start, end) { |
| 7809 | var out = [], n = start.line; |
| 7810 | doc.iter(start.line, end.line + 1, function(line) { |
| 7811 | var text = line.text; |
| 7812 | if (n == end.line) text = text.slice(0, end.ch); |
| 7813 | if (n == start.line) text = text.slice(start.ch); |
| 7814 | out.push(text); |
| 7815 | ++n; |
| 7816 | }); |
| 7817 | return out; |
| 7818 | } |
| 7819 | // Get the lines between from and to, as array of strings. |
| 7820 | function getLines(doc, from, to) { |
| 7821 | var out = []; |
no outgoing calls
no test coverage detected