Changeset: Replace appendATextToAssembler() with a generator

This commit is contained in:
Richard Hansen 2021-10-25 01:16:46 -04:00
parent 9cd59a84af
commit d74dd235a4
5 changed files with 26 additions and 10 deletions

View file

@ -499,7 +499,7 @@ Pad.prototype.copyPadWithoutHistory = async function (destinationID, force) {
// based on Changeset.makeSplice
const assem = Changeset.smartOpAssembler();
Changeset.appendATextToAssembler(oldAText, assem);
for (const op of Changeset.opsFromAText(oldAText)) assem.append(op);
assem.endDocument();
// although we have instantiated the newPad with '\n', an additional '\n' is