(spans)
| 5218 | // Remove spans that are empty and don't have a clearWhenEmpty |
| 5219 | // option of false. |
| 5220 | function clearEmptySpans(spans) { |
| 5221 | for (var i = 0; i < spans.length; ++i) { |
| 5222 | var span = spans[i]; |
| 5223 | if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) |
| 5224 | spans.splice(i--, 1); |
| 5225 | } |
| 5226 | if (!spans.length) return null; |
| 5227 | return spans; |
| 5228 | } |
| 5229 | |
| 5230 | // Used for un/re-doing changes from the history. Combines the |
| 5231 | // result of computing the existing spans with the set of spans that |
no outgoing calls
no test coverage detected