MCPcopy Create free account
hub / github.com/DHTMLX/gantt / clearEmptySpans

Function clearEmptySpans

samples/common/codehighlight/codemirror.js:1426–1434  ·  view source on GitHub ↗
(spans)

Source from the content-addressed store, hash-verified

1424 // Remove spans that are empty and don't have a clearWhenEmpty
1425 // option of false.
1426 function clearEmptySpans(spans) {
1427 for (var i = 0; i < spans.length; ++i) {
1428 var span = spans[i];
1429 if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)
1430 { spans.splice(i--, 1); }
1431 }
1432 if (!spans.length) { return null }
1433 return spans
1434 }
1435
1436 // Used to 'clip' out readOnly ranges when making a change.
1437 function removeReadOnlyRanges(doc, from, to) {

Callers 1

stretchSpansOverChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected