(doc, start, end)
| 5218 | } |
| 5219 | |
| 5220 | function getBetween(doc, start, end) { |
| 5221 | var out = [], n = start.line; |
| 5222 | doc.iter(start.line, end.line + 1, function(line) { |
| 5223 | var text = line.text; |
| 5224 | if (n == end.line) text = text.slice(0, end.ch); |
| 5225 | if (n == start.line) text = text.slice(start.ch); |
| 5226 | out.push(text); |
| 5227 | ++n; |
| 5228 | }); |
| 5229 | return out; |
| 5230 | } |
| 5231 | function getLines(doc, from, to) { |
| 5232 | var out = []; |
| 5233 | doc.iter(from, to, function(line) { out.push(line.text); }); |
no test coverage detected