(spans, marker)
| 1165 | |
| 1166 | // Search an array of spans for a span matching the given marker. |
| 1167 | function getMarkedSpanFor(spans, marker) { |
| 1168 | if (spans) { |
| 1169 | for (var i = 0; i < spans.length; ++i) { |
| 1170 | var span = spans[i] |
| 1171 | if (span.marker == marker) { |
| 1172 | return span |
| 1173 | } |
| 1174 | } |
| 1175 | } |
| 1176 | } |
| 1177 | // Remove a span from an array, returning undefined if no spans are |
| 1178 | // left (we don't store arrays for lines without spans). |
| 1179 | function removeMarkedSpan(spans, span) { |
no outgoing calls
no test coverage detected