Use `TextRange` to improve handling of overlapping highlights
After resolving an annotation's selectors to a `Range`, convert the range to a `TextRange` object which is stored with the anchor and later resolved to a concrete `Range` just before inserting highlights. Representing the anchored region using a `TextRange` allows for the correct text to be highlighted later if the region has been modified as a result of inserting other highlights, providing that the text content of the region has not been changed. Fixes https://github.com/hypothesis/h/issues/3278 Fixes https://github.com/hypothesis/client/issues/2326 Fixes https://github.com/hypothesis/h/issues/5997
Showing
Please register or sign in to comment