(spans)
| 6427 | // Remove spans that are empty and don't have a clearWhenEmpty |
| 6428 | // option of false. |
| 6429 | function clearEmptySpans(spans) { |
| 6430 | for (var i = 0; i < spans.length; ++i) { |
| 6431 | var span = spans[i]; |
| 6432 | if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) |
| 6433 | spans.splice(i--, 1); |
| 6434 | } |
| 6435 | if (!spans.length) return null; |
| 6436 | return spans; |
| 6437 | } |
| 6438 | |
| 6439 | // Used for un/re-doing changes from the history. Combines the |
| 6440 | // result of computing the existing spans with the set of spans that |
no outgoing calls
no test coverage detected