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

Function getOldSpans

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

Source from the content-addressed store, hash-verified

6689
6690 // Retrieve and filter the old marked spans stored in a change event.
6691 function getOldSpans(doc, change) {
6692 var found = change["spans_" + doc.id];
6693 if (!found) return null;
6694 for (var i = 0, nw = []; i < change.text.length; ++i)
6695 nw.push(removeClearedSpans(found[i]));
6696 return nw;
6697 }
6698
6699 // Used both to provide a JSON-safe object in .getHistory, and, when
6700 // 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