(old, startCh, isInsert)
| 1330 | // character position, returning an array of remaining chunks (or |
| 1331 | // undefined if nothing remains). |
| 1332 | function markedSpansBefore(old, startCh, isInsert) { |
| 1333 | var nw; |
| 1334 | if (old) { for (var i = 0; i < old.length; ++i) { |
| 1335 | var span = old[i], marker = span.marker; |
| 1336 | var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); |
| 1337 | if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { |
| 1338 | var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh) |
| 1339 | ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); |
| 1340 | } |
| 1341 | } } |
| 1342 | return nw |
| 1343 | } |
| 1344 | function markedSpansAfter(old, endCh, isInsert) { |
| 1345 | var nw; |
| 1346 | if (old) { for (var i = 0; i < old.length; ++i) { |
no outgoing calls
no test coverage detected