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

Function historyChangeFromChange

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

Source from the content-addressed store, hash-verified

7883 // Create a history change event from an updateDoc-style change
7884 // object.
7885 function historyChangeFromChange(doc, change) {
7886 var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};
7887 attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
7888 linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true);
7889 return histChange;
7890 }
7891
7892 // Pop all selection events off the end of a history array. Stop at
7893 // a change event.

Callers 2

makeChangeFromHistoryFunction · 0.70
addChangeToHistoryFunction · 0.70

Calls 4

copyPosFunction · 0.70
getBetweenFunction · 0.70
attachLocalSpansFunction · 0.70
linkedDocsFunction · 0.70

Tested by

no test coverage detected