MCPcopy Create free account
hub / github.com/csev/py4e / removeClearedSpans

Function removeClearedSpans

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

Source from the content-addressed store, hash-verified

5368 }
5369
5370 function removeClearedSpans(spans) {
5371 if (!spans) return null;
5372 for (var i = 0, out; i < spans.length; ++i) {
5373 if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }
5374 else if (out) out.push(spans[i]);
5375 }
5376 return !out ? spans : out.length ? out : null;
5377 }
5378
5379 function getOldSpans(doc, change) {
5380 var found = change["spans_" + doc.id];

Callers 1

getOldSpansFunction · 0.70

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected