MCPcopy Index your code
hub / github.com/witheve/Eve / clearEmptySpans

Function clearEmptySpans

src/codemirror.js:6454–6462  ·  view source on GitHub ↗
(spans)

Source from the content-addressed store, hash-verified

6452 // Remove spans that are empty and don't have a clearWhenEmpty
6453 // option of false.
6454 function clearEmptySpans(spans) {
6455 for (var i = 0; i < spans.length; ++i) {
6456 var span = spans[i];
6457 if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)
6458 spans.splice(i--, 1);
6459 }
6460 if (!spans.length) return null;
6461 return spans;
6462 }
6463
6464 // Used for un/re-doing changes from the history. Combines the
6465 // result of computing the existing spans with the set of spans that

Callers 1

stretchSpansOverChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected