MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / getOldSpans

Function getOldSpans

static/js/codemirror/codemirror.js:4730–4736  ·  view source on GitHub ↗
(doc, change)

Source from the content-addressed store, hash-verified

4728 }
4729
4730 function getOldSpans(doc, change) {
4731 var found = change["spans_" + doc.id];
4732 if (!found) return null;
4733 for (var i = 0, nw = []; i < change.text.length; ++i)
4734 nw.push(removeClearedSpans(found[i]));
4735 return nw;
4736 }
4737
4738 // Used both to provide a JSON-safe object in .getHistory, and, when
4739 // detaching a document, to split the history in two

Callers 1

mergeOldSpansFunction · 0.85

Calls 2

removeClearedSpansFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected