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

Function buildCollapsedSpan

static/mergely/lib/codemirror.js:7064–7077  ·  view source on GitHub ↗
(builder, size, marker, ignoreWidget)

Source from the content-addressed store, hash-verified

7062 }
7063
7064 function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
7065 var widget = !ignoreWidget && marker.widgetNode;
7066 if (widget) builder.map.push(builder.pos, builder.pos + size, widget);
7067 if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {
7068 if (!widget)
7069 widget = builder.content.appendChild(document.createElement("span"));
7070 widget.setAttribute("cm-marker", marker.id);
7071 }
7072 if (widget) {
7073 builder.cm.display.input.setUneditable(widget);
7074 builder.content.appendChild(widget);
7075 }
7076 builder.pos += size;
7077 }
7078
7079 // Outputs a number of spans to make up a line, taking highlighting
7080 // and marked text into account.

Callers 1

insertLineContentFunction · 0.70

Calls 1

setAttributeMethod · 0.45

Tested by

no test coverage detected