-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for the util method `extractSlices`. When extracting slices, we need to adjust the ranges of marks that appear after each slice in the document. In order to do this, we keep track of the ranges that are to be deleted and then loop over them, adjusting the mark ranges as needed. However, when we have nested slices, each slice may be split by another slice, causing a slice to have multiple ranges. In this case, the list of ranges to be deleted would be overlapping, and thus eventually cause the mark ranges to be adjusted incorrectly. This fix normalizes the list of ranges to be deleted before we start updating mark ranges by first sorting those ranges and then merging overlapping ranges into each other.
- Loading branch information
Showing
2 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters