mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 17:06:16 -04:00
Use the new AttributeMap and Changeset APIs
This commit is contained in:
parent
f00b1ae89b
commit
a02e45499d
3 changed files with 6 additions and 31 deletions
|
@ -346,9 +346,7 @@ describe(__filename, function () {
|
|||
// numbers do not change if the attribute processing code changes.)
|
||||
for (const attrib of knownAttribs) apool.putAttrib(attrib);
|
||||
for (const aline of tc.wantAlines) {
|
||||
const opIter = Changeset.opIterator(aline);
|
||||
while (opIter.hasNext()) {
|
||||
const op = opIter.next();
|
||||
for (const op of Changeset.deserializeOps(aline)) {
|
||||
for (const n of attributes.decodeAttribString(op.attribs)) {
|
||||
assert(n < knownAttribs.length);
|
||||
}
|
||||
|
@ -375,9 +373,7 @@ describe(__filename, function () {
|
|||
gotAttribs.push(gotAlineAttribs);
|
||||
const wantAlineAttribs = [];
|
||||
wantAttribs.push(wantAlineAttribs);
|
||||
const opIter = Changeset.opIterator(aline);
|
||||
while (opIter.hasNext()) {
|
||||
const op = opIter.next();
|
||||
for (const op of Changeset.deserializeOps(aline)) {
|
||||
const gotOpAttribs = [...attributes.attribsFromString(op.attribs, apool)];
|
||||
gotAlineAttribs.push(gotOpAttribs);
|
||||
wantAlineAttribs.push(attributes.sort([...gotOpAttribs]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue