(spans)
| 6452 | // Remove spans that are empty and don't have a clearWhenEmpty |
| 6453 | // option of false. |
| 6454 | function clearEmptySpans(spans) { |
| 6455 | for (var i = 0; i < spans.length; ++i) { |
| 6456 | var span = spans[i]; |
| 6457 | if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) |
| 6458 | spans.splice(i--, 1); |
| 6459 | } |
| 6460 | if (!spans.length) return null; |
| 6461 | return spans; |
| 6462 | } |
| 6463 | |
| 6464 | // Used for un/re-doing changes from the history. Combines the |
| 6465 | // result of computing the existing spans with the set of spans that |
no outgoing calls
no test coverage detected