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

Function updateLine

static/editor.md/lib/codemirror/lib/codemirror.js:6518–6527  ·  view source on GitHub ↗
(line, text, markedSpans, estimateHeight)

Source from the content-addressed store, hash-verified

6516 // invalidates cached information and tries to re-estimate the
6517 // line's height.
6518 function updateLine(line, text, markedSpans, estimateHeight) {
6519 line.text = text;
6520 if (line.stateAfter) line.stateAfter = null;
6521 if (line.styles) line.styles = null;
6522 if (line.order != null) line.order = null;
6523 detachMarkedSpans(line);
6524 attachMarkedSpans(line, markedSpans);
6525 var estHeight = estimateHeight ? estimateHeight(line) : 1;
6526 if (estHeight != line.height) updateLineHeight(line, estHeight);
6527 }
6528
6529 // Detach a line from the document tree and its markers.
6530 function cleanUpLine(line) {

Callers 1

updateFunction · 0.70

Calls 4

detachMarkedSpansFunction · 0.70
attachMarkedSpansFunction · 0.70
estimateHeightFunction · 0.70
updateLineHeightFunction · 0.70

Tested by

no test coverage detected