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

Function ensureLineWrapped

static/editor.md/lib/codemirror/lib/codemirror.js:890–899  ·  view source on GitHub ↗
(lineView)

Source from the content-addressed store, hash-verified

888 // Lines with gutter elements, widgets or a background class need to
889 // be wrapped, and have the extra elements added to the wrapper div
890 function ensureLineWrapped(lineView) {
891 if (lineView.node == lineView.text) {
892 lineView.node = elt("div", null, null, "position: relative");
893 if (lineView.text.parentNode)
894 lineView.text.parentNode.replaceChild(lineView.node, lineView.text);
895 lineView.node.appendChild(lineView.text);
896 if (ie && ie_version < 8) lineView.node.style.zIndex = 2;
897 }
898 return lineView.node;
899 }
900
901 function updateLineBackground(lineView) {
902 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