MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / collapsedSpanAtSide

Function collapsedSpanAtSide

static/plugins/codemirror/codemirror.js:1509–1518  ·  view source on GitHub ↗
(line, start)

Source from the content-addressed store, hash-verified

1507 // Find out whether a line ends or starts in a collapsed span. If
1508 // so, return the marker for that span.
1509 function collapsedSpanAtSide(line, start) {
1510 var sps = sawCollapsedSpans && line.markedSpans, found;
1511 if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
1512 sp = sps[i];
1513 if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&
1514 (!found || compareCollapsedMarkers(found, sp.marker) < 0))
1515 { found = sp.marker; }
1516 } }
1517 return found
1518 }
1519 function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }
1520 function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }
1521

Callers 2

collapsedSpanAtStartFunction · 0.85
collapsedSpanAtEndFunction · 0.85

Calls 1

compareCollapsedMarkersFunction · 0.85

Tested by

no test coverage detected