MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / getBetween

Function getBetween

static/js/codemirror/codemirror.js:4571–4581  ·  view source on GitHub ↗
(doc, start, end)

Source from the content-addressed store, hash-verified

4569 }
4570
4571 function getBetween(doc, start, end) {
4572 var out = [], n = start.line;
4573 doc.iter(start.line, end.line + 1, function(line) {
4574 var text = line.text;
4575 if (n == end.line) text = text.slice(0, end.ch);
4576 if (n == start.line) text = text.slice(start.ch);
4577 out.push(text);
4578 ++n;
4579 });
4580 return out;
4581 }
4582 function getLines(doc, from, to) {
4583 var out = [];
4584 doc.iter(from, to, function(line) { out.push(line.text); });

Callers 2

codemirror.jsFile · 0.85
historyChangeFromChangeFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected