MCPcopy Create free account
hub / github.com/csev/py4e / getOldSpans

Function getOldSpans

tools/pythonauto/static/codemirror/codemirror.js:5379–5385  ·  view source on GitHub ↗
(doc, change)

Source from the content-addressed store, hash-verified

5377 }
5378
5379 function getOldSpans(doc, change) {
5380 var found = change["spans_" + doc.id];
5381 if (!found) return null;
5382 for (var i = 0, nw = []; i < change.text.length; ++i)
5383 nw.push(removeClearedSpans(found[i]));
5384 return nw;
5385 }
5386
5387 // Used both to provide a JSON-safe object in .getHistory, and, when
5388 // detaching a document, to split the history in two

Callers 1

mergeOldSpansFunction · 0.70

Calls 1

removeClearedSpansFunction · 0.70

Tested by

no test coverage detected