(doc, start, end)
| 905 | // Get the part of a document between two positions, as an array of |
| 906 | // strings. |
| 907 | function getBetween(doc, start, end) { |
| 908 | var out = [], n = start.line; |
| 909 | doc.iter(start.line, end.line + 1, function (line) { |
| 910 | var text = line.text; |
| 911 | if (n == end.line) { text = text.slice(0, end.ch); } |
| 912 | if (n == start.line) { text = text.slice(start.ch); } |
| 913 | out.push(text); |
| 914 | ++n; |
| 915 | }); |
| 916 | return out |
| 917 | } |
| 918 | // Get the lines between from and to, as array of strings. |
| 919 | function getLines(doc, from, to) { |
| 920 | var out = []; |
no outgoing calls
no test coverage detected