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

Function getOldSpans

static/editor.md/lib/codemirror/lib/codemirror.js:7793–7799  ·  view source on GitHub ↗
(doc, change)

Source from the content-addressed store, hash-verified

7791
7792 // Retrieve and filter the old marked spans stored in a change event.
7793 function getOldSpans(doc, change) {
7794 var found = change["spans_" + doc.id];
7795 if (!found) return null;
7796 for (var i = 0, nw = []; i < change.text.length; ++i)
7797 nw.push(removeClearedSpans(found[i]));
7798 return nw;
7799 }
7800
7801 // Used both to provide a JSON-safe object in .getHistory, and, when
7802 // 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