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

Function update

static/editor.md/lib/codemirror/addon/merge/merge.js:74–94  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

72 var orig = {from: 0, to: 0, marked: []};
73 var debounceChange, updatingFast = false;
74 function update(mode) {
75 updating = true;
76 updatingFast = false;
77 if (mode == "full") {
78 if (dv.svg) clear(dv.svg);
79 if (dv.copyButtons) clear(dv.copyButtons);
80 clearMarks(dv.edit, edit.marked, dv.classes);
81 clearMarks(dv.orig, orig.marked, dv.classes);
82 edit.from = edit.to = orig.from = orig.to = 0;
83 }
84 ensureDiff(dv);
85 if (dv.showDifferences) {
86 updateMarks(dv.edit, dv.diff, edit, DIFF_INSERT, dv.classes);
87 updateMarks(dv.orig, dv.diff, orig, DIFF_DELETE, dv.classes);
88 }
89 makeConnections(dv);
90
91 if (dv.mv.options.connect == "align")
92 alignChunks(dv);
93 updating = false;
94 }
95 function setDealign(fast) {
96 if (updating) return;
97 dv.dealigned = true;

Callers 1

registerUpdateFunction · 0.70

Calls 6

ensureDiffFunction · 0.85
updateMarksFunction · 0.85
makeConnectionsFunction · 0.85
alignChunksFunction · 0.85
clearFunction · 0.70
clearMarksFunction · 0.70

Tested by

no test coverage detected