(spans)
| 6225 | // Remove spans that are empty and don't have a clearWhenEmpty |
| 6226 | // option of false. |
| 6227 | function clearEmptySpans(spans) { |
| 6228 | for (var i = 0; i < spans.length; ++i) { |
| 6229 | var span = spans[i]; |
| 6230 | if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) |
| 6231 | spans.splice(i--, 1); |
| 6232 | } |
| 6233 | if (!spans.length) return null; |
| 6234 | return spans; |
| 6235 | } |
| 6236 | |
| 6237 | // Used for un/re-doing changes from the history. Combines the |
| 6238 | // result of computing the existing spans with the set of spans that |
no outgoing calls
no test coverage detected