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

Function buildLineElement

static/editor.md/lib/codemirror/lib/codemirror.js:994–1004  ·  view source on GitHub ↗
(cm, lineView, lineN, dims)

Source from the content-addressed store, hash-verified

992
993 // Build a line's DOM representation from scratch
994 function buildLineElement(cm, lineView, lineN, dims) {
995 var built = getLineContent(cm, lineView);
996 lineView.text = lineView.node = built.pre;
997 if (built.bgClass) lineView.bgClass = built.bgClass;
998 if (built.textClass) lineView.textClass = built.textClass;
999
1000 updateLineClasses(lineView);
1001 updateLineGutter(cm, lineView, lineN, dims);
1002 insertLineWidgets(cm, lineView, dims);
1003 return lineView.node;
1004 }
1005
1006 // A lineView may contain multiple logical lines (when merged by
1007 // collapsed spans). The widgets for all of them need to be drawn.

Callers 1

patchDisplayFunction · 0.70

Calls 4

getLineContentFunction · 0.70
updateLineClassesFunction · 0.70
updateLineGutterFunction · 0.70
insertLineWidgetsFunction · 0.70

Tested by

no test coverage detected