MCPcopy
hub / github.com/csev/py4e / collapsedSpanAtSide

Function collapsedSpanAtSide

tools/pythonauto/static/codemirrorepl/codemirror.js:5321–5330  ·  view source on GitHub ↗
(line, start)

Source from the content-addressed store, hash-verified

5319 // Find out whether a line ends or starts in a collapsed span. If
5320 // so, return the marker for that span.
5321 function collapsedSpanAtSide(line, start) {
5322 var sps = sawCollapsedSpans && line.markedSpans, found;
5323 if (sps) for (var sp, i = 0; i < sps.length; ++i) {
5324 sp = sps[i];
5325 if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&
5326 (!found || compareCollapsedMarkers(found, sp.marker) < 0))
5327 found = sp.marker;
5328 }
5329 return found;
5330 }
5331 function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true); }
5332 function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); }
5333

Callers 2

collapsedSpanAtStartFunction · 0.70
collapsedSpanAtEndFunction · 0.70

Calls 1

compareCollapsedMarkersFunction · 0.70

Tested by

no test coverage detected