MCPcopy
hub / github.com/witheve/Eve / getBetween

Function getBetween

src/codemirror.js:7808–7818  ·  view source on GitHub ↗
(doc, start, end)

Source from the content-addressed store, hash-verified

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 = [];

Callers 4

codemirror.jsFile · 0.85
walkFunction · 0.85
makeChangeSingleDocFunction · 0.85
historyChangeFromChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected