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

Function ensureLineWrapped

static/mergely/lib/codemirror.js:907–916  ·  view source on GitHub ↗
(lineView)

Source from the content-addressed store, hash-verified

905 // Lines with gutter elements, widgets or a background class need to
906 // be wrapped, and have the extra elements added to the wrapper div
907 function ensureLineWrapped(lineView) {
908 if (lineView.node == lineView.text) {
909 lineView.node = elt("div", null, null, "position: relative");
910 if (lineView.text.parentNode)
911 lineView.text.parentNode.replaceChild(lineView.node, lineView.text);
912 lineView.node.appendChild(lineView.text);
913 if (ie && ie_version < 8) lineView.node.style.zIndex = 2;
914 }
915 return lineView.node;
916 }
917
918 function updateLineBackground(lineView) {
919 var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;

Callers 4

updateLineBackgroundFunction · 0.70
updateLineClassesFunction · 0.70
updateLineGutterFunction · 0.70
insertLineWidgetsForFunction · 0.70

Calls 1

eltFunction · 0.70

Tested by

no test coverage detected