(doc, change)
| 6689 | |
| 6690 | // Retrieve and filter the old marked spans stored in a change event. |
| 6691 | function getOldSpans(doc, change) { |
| 6692 | var found = change["spans_" + doc.id]; |
| 6693 | if (!found) return null; |
| 6694 | for (var i = 0, nw = []; i < change.text.length; ++i) |
| 6695 | nw.push(removeClearedSpans(found[i])); |
| 6696 | return nw; |
| 6697 | } |
| 6698 | |
| 6699 | // Used both to provide a JSON-safe object in .getHistory, and, when |
| 6700 | // detaching a document, to split the history in two |
no test coverage detected