MCPcopy Index your code
hub / github.com/csev/py4e / clearEmptySpans

Function clearEmptySpans

tools/pythonauto/static/codemirror/codemirror.js:4164–4172  ·  view source on GitHub ↗
(spans)

Source from the content-addressed store, hash-verified

4162 }
4163
4164 function clearEmptySpans(spans) {
4165 for (var i = 0; i < spans.length; ++i) {
4166 var span = spans[i];
4167 if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)
4168 spans.splice(i--, 1);
4169 }
4170 if (!spans.length) return null;
4171 return spans;
4172 }
4173
4174 function mergeOldSpans(doc, change) {
4175 var old = getOldSpans(doc, change);

Callers 1

stretchSpansOverChangeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected