(doc, change)
| 8022 | |
| 8023 | // Retrieve and filter the old marked spans stored in a change event. |
| 8024 | function getOldSpans(doc, change) { |
| 8025 | var found = change["spans_" + doc.id]; |
| 8026 | if (!found) return null; |
| 8027 | for (var i = 0, nw = []; i < change.text.length; ++i) |
| 8028 | nw.push(removeClearedSpans(found[i])); |
| 8029 | return nw; |
| 8030 | } |
| 8031 | |
| 8032 | // Used both to provide a JSON-safe object in .getHistory, and, when |
| 8033 | // detaching a document, to split the history in two |
no test coverage detected