(old, startCh, isInsert)
| 6360 | // character position, returning an array of remaining chunks (or |
| 6361 | // undefined if nothing remains). |
| 6362 | function markedSpansBefore(old, startCh, isInsert) { |
| 6363 | if (old) for (var i = 0, nw; i < old.length; ++i) { |
| 6364 | var span = old[i], marker = span.marker; |
| 6365 | var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); |
| 6366 | if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { |
| 6367 | var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh); |
| 6368 | (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); |
| 6369 | } |
| 6370 | } |
| 6371 | return nw; |
| 6372 | } |
| 6373 | function markedSpansAfter(old, endCh, isInsert) { |
| 6374 | if (old) for (var i = 0, nw; i < old.length; ++i) { |
| 6375 | var span = old[i], marker = span.marker; |
no outgoing calls
no test coverage detected