(old, startCh, isInsert)
| 6335 | // character position, returning an array of remaining chunks (or |
| 6336 | // undefined if nothing remains). |
| 6337 | function markedSpansBefore(old, startCh, isInsert) { |
| 6338 | if (old) for (var i = 0, nw; i < old.length; ++i) { |
| 6339 | var span = old[i], marker = span.marker; |
| 6340 | var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); |
| 6341 | if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { |
| 6342 | var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh); |
| 6343 | (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); |
| 6344 | } |
| 6345 | } |
| 6346 | return nw; |
| 6347 | } |
| 6348 | function markedSpansAfter(old, endCh, isInsert) { |
| 6349 | if (old) for (var i = 0, nw; i < old.length; ++i) { |
| 6350 | var span = old[i], marker = span.marker; |
no outgoing calls
no test coverage detected