MCPcopy Create free account
hub / github.com/TruthHun/BookStack / getBetween

Function getBetween

static/mergely/lib/codemirror.js:7776–7786  ·  view source on GitHub ↗
(doc, start, end)

Source from the content-addressed store, hash-verified

7774 // Get the part of a document between two positions, as an array of
7775 // strings.
7776 function getBetween(doc, start, end) {
7777 var out = [], n = start.line;
7778 doc.iter(start.line, end.line + 1, function(line) {
7779 var text = line.text;
7780 if (n == end.line) text = text.slice(0, end.ch);
7781 if (n == start.line) text = text.slice(start.ch);
7782 out.push(text);
7783 ++n;
7784 });
7785 return out;
7786 }
7787 // Get the lines between from and to, as array of strings.
7788 function getLines(doc, from, to) {
7789 var out = [];

Callers 4

codemirror.jsFile · 0.70
walkFunction · 0.70
makeChangeSingleDocFunction · 0.70
historyChangeFromChangeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected