We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d385a5 commit 70909dfCopy full SHA for 70909df
src/document/crdt/text.ts
@@ -351,7 +351,12 @@ export class CRDTText<A extends Indexable = Indexable> extends CRDTGCElement {
351
toBeStyleds.push(toNode!);
352
toNode!.setStyleOpsAfter(toOpSet!);
353
} else if (toBoundaryType === BoundaryType.End) {
354
- // TODO(MoonGyu1): Add last node to toBeStyled
+ // Add last node to toBeStyled if boundary type is End
355
+ let lastNode = fromNode;
356
+ while (lastNode.getNext() && !lastNode.getNext()!.isRemoved()) {
357
+ lastNode = lastNode.getNext()!;
358
+ }
359
+ toBeStyleds.push(lastNode);
360
if (!toOpSet) this.lastAnchor = new Set();
361
}
362
0 commit comments