(doc, change)
| 4728 | } |
| 4729 | |
| 4730 | function getOldSpans(doc, change) { |
| 4731 | var found = change["spans_" + doc.id]; |
| 4732 | if (!found) return null; |
| 4733 | for (var i = 0, nw = []; i < change.text.length; ++i) |
| 4734 | nw.push(removeClearedSpans(found[i])); |
| 4735 | return nw; |
| 4736 | } |
| 4737 | |
| 4738 | // Used both to provide a JSON-safe object in .getHistory, and, when |
| 4739 | // detaching a document, to split the history in two |
no test coverage detected