(doc, change)
| 7791 | |
| 7792 | // Retrieve and filter the old marked spans stored in a change event. |
| 7793 | function getOldSpans(doc, change) { |
| 7794 | var found = change["spans_" + doc.id]; |
| 7795 | if (!found) return null; |
| 7796 | for (var i = 0, nw = []; i < change.text.length; ++i) |
| 7797 | nw.push(removeClearedSpans(found[i])); |
| 7798 | return nw; |
| 7799 | } |
| 7800 | |
| 7801 | // Used both to provide a JSON-safe object in .getHistory, and, when |
| 7802 | // detaching a document, to split the history in two |
no test coverage detected