Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: extract nested slices #1821

Merged
merged 5 commits into from
Nov 13, 2024
Merged

fix: extract nested slices #1821

merged 5 commits into from
Nov 13, 2024

Commits on Nov 13, 2024

  1. fix: extract nested slices

    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.
    bachbui committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    1ab13e8 View commit details
    Browse the repository at this point in the history
  2. chore: update unit tests

    bachbui committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    0f0c6a3 View commit details
    Browse the repository at this point in the history
  3. chore: more unit tests

    bachbui committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    ebd358d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    70afbe7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    95b081e View commit details
    Browse the repository at this point in the history