Changeset: Migrate from OpIter to deserializeOps()

This commit is contained in:
Richard Hansen 2021-10-25 05:48:58 -04:00
parent 0eca0251f2
commit 89fe40e080
16 changed files with 147 additions and 179 deletions

View file

@ -197,13 +197,12 @@ const getHTMLFromAtext = async (pad, atext, authorColors) => {
return;
}
const iter = Changeset.opIterator(Changeset.subattribution(attribs, idx, idx + numChars));
const ops = Changeset.deserializeOps(Changeset.subattribution(attribs, idx, idx + numChars));
idx += numChars;
// this iterates over every op string and decides which tags to open or to close
// based on the attribs used
while (iter.hasNext()) {
const o = iter.next();
for (const o of ops) {
const usedAttribs = [];
// mark all attribs as used