MCPcopy Index your code
hub / github.com/DHTMLX/gantt / getBetween

Function getBetween

samples/common/codehighlight/codemirror.js:907–917  ·  view source on GitHub ↗
(doc, start, end)

Source from the content-addressed store, hash-verified

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

Callers 4

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

Calls

no outgoing calls

Tested by

no test coverage detected