MCPcopy
hub / github.com/witheve/Eve / buildCollapsedSpan

Function buildCollapsedSpan

src/codemirror.js:7092–7105  ·  view source on GitHub ↗
(builder, size, marker, ignoreWidget)

Source from the content-addressed store, hash-verified

7090 }
7091
7092 function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
7093 var widget = !ignoreWidget && marker.widgetNode;
7094 if (widget) builder.map.push(builder.pos, builder.pos + size, widget);
7095 if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {
7096 if (!widget)
7097 widget = builder.content.appendChild(document.createElement("span"));
7098 widget.setAttribute("cm-marker", marker.id);
7099 }
7100 if (widget) {
7101 builder.cm.display.input.setUneditable(widget);
7102 builder.content.appendChild(widget);
7103 }
7104 builder.pos += size;
7105 }
7106
7107 // Outputs a number of spans to make up a line, taking highlighting
7108 // and marked text into account.

Callers 1

insertLineContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected