diff --git a/src/rangeset.ts b/src/rangeset.ts index 32492fd..dd53355 100644 --- a/src/rangeset.ts +++ b/src/rangeset.ts @@ -840,9 +840,9 @@ function compare(a: SpanCursor, startA: number, comparator.comparePoint(pos, clipEnd, a.point, b.point) } else { if (clipEnd > pos && !sameValues(a.active, b.active)) comparator.compareRange(pos, clipEnd, a.active, b.active) - else if (end < endB && (dEnd || a.openEnd != b.openEnd) && comparator.boundChange) comparator.boundChange(clipEnd) } if (end > endB) break + if ((dEnd || a.openEnd != b.openEnd) && comparator.boundChange) comparator.boundChange(end) pos = end if (diff <= 0) a.next() if (diff >= 0) b.next() diff --git a/src/text.ts b/src/text.ts index 1184db2..199343a 100644 --- a/src/text.ts +++ b/src/text.ts @@ -146,6 +146,7 @@ export abstract class Text implements Iterable { /// objects that it is made up of. For leaf nodes, this holds null. abstract readonly children: readonly Text[] | null + /// @hide [Symbol.iterator]!: () => Iterator /// Create a `Text` instance for the given array of lines.