(old, startCh, isInsert)
| 1196 | // character position, returning an array of remaining chunks (or |
| 1197 | // undefined if nothing remains). |
| 1198 | function markedSpansBefore(old, startCh, isInsert) { |
| 1199 | var nw |
| 1200 | if (old) { |
| 1201 | for (var i = 0; i < old.length; ++i) { |
| 1202 | var span = old[i], |
| 1203 | marker = span.marker |
| 1204 | var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh) |
| 1205 | if (startsBefore || (span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft))) { |
| 1206 | var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh) |
| 1207 | ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)) |
| 1208 | } |
| 1209 | } |
| 1210 | } |
| 1211 | return nw |
| 1212 | } |
| 1213 | function markedSpansAfter(old, endCh, isInsert) { |
| 1214 | var nw |
| 1215 | if (old) { |
no outgoing calls
no test coverage detected