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

Function makeChangeInner

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

Source from the content-addressed store, hash-verified

4199 }
4200
4201 function makeChangeInner(doc, change) {
4202 if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) return;
4203 var selAfter = computeSelAfterChange(doc, change);
4204 addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
4205
4206 makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
4207 var rebased = [];
4208
4209 linkedDocs(doc, function(doc, sharedHist) {
4210 if (!sharedHist && indexOf(rebased, doc.history) == -1) {
4211 rebaseHist(doc.history, change);
4212 rebased.push(doc.history);
4213 }
4214 makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
4215 });
4216 }
4217
4218 // Revert a change stored in a document's history.
4219 function makeChangeFromHistory(doc, type, allowSelectionOnly) {

Callers 1

makeChangeFunction · 0.70

Calls 8

computeSelAfterChangeFunction · 0.70
addChangeToHistoryFunction · 0.70
makeChangeSingleDocFunction · 0.70
stretchSpansOverChangeFunction · 0.70
linkedDocsFunction · 0.70
indexOfFunction · 0.70
rebaseHistFunction · 0.70
cmpFunction · 0.50

Tested by

no test coverage detected