(old, startCh, isInsert)
| 5127 | // character position, returning an array of remaining chunks (or |
| 5128 | // undefined if nothing remains). |
| 5129 | function markedSpansBefore(old, startCh, isInsert) { |
| 5130 | if (old) for (var i = 0, nw; i < old.length; ++i) { |
| 5131 | var span = old[i], marker = span.marker; |
| 5132 | var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); |
| 5133 | if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { |
| 5134 | var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh); |
| 5135 | (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); |
| 5136 | } |
| 5137 | } |
| 5138 | return nw; |
| 5139 | } |
| 5140 | function markedSpansAfter(old, endCh, isInsert) { |
| 5141 | if (old) for (var i = 0, nw; i < old.length; ++i) { |
| 5142 | var span = old[i], marker = span.marker; |
no outgoing calls
no test coverage detected