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

Function getBetween

static/editor.md/lib/codemirror/lib/codemirror.js:7545–7555  ·  view source on GitHub ↗
(doc, start, end)

Source from the content-addressed store, hash-verified

7543 // Get the part of a document between two positions, as an array of
7544 // strings.
7545 function getBetween(doc, start, end) {
7546 var out = [], n = start.line;
7547 doc.iter(start.line, end.line + 1, function(line) {
7548 var text = line.text;
7549 if (n == end.line) text = text.slice(0, end.ch);
7550 if (n == start.line) text = text.slice(start.ch);
7551 out.push(text);
7552 ++n;
7553 });
7554 return out;
7555 }
7556 // Get the lines between from and to, as array of strings.
7557 function getLines(doc, from, to) {
7558 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