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

Function getOldSpans

static/mergely/lib/codemirror.js:8024–8030  ·  view source on GitHub ↗
(doc, change)

Source from the content-addressed store, hash-verified

8022
8023 // Retrieve and filter the old marked spans stored in a change event.
8024 function getOldSpans(doc, change) {
8025 var found = change["spans_" + doc.id];
8026 if (!found) return null;
8027 for (var i = 0, nw = []; i < change.text.length; ++i)
8028 nw.push(removeClearedSpans(found[i]));
8029 return nw;
8030 }
8031
8032 // Used both to provide a JSON-safe object in .getHistory, and, when
8033 // 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