journaly icon indicating copy to clipboard operation
journaly copied to clipboard

🐞 Update Post / Update Highlight Algorithm Doesn't Expand The Highlight Fully

Open robin-macpherson opened this issue 1 year ago β€’ 0 comments

Description

Our algorithm for updating a highlight (or marking it as outdated) should expand the highlight to the full scope of the changed text that is still part of the comment, but when testing one use case just now it didn't fully capture this behavior.

See below, the original highlighted text was "δΈζ˜―η†ζƒ³" and the comment suggested "ι›–η„ΆδΈζ˜―εΎˆη†ζƒ³" - just adding 2 chars at the front and one in the middle. The highlight was preserved but remained in the original position and didn't expand to cover the full new text.

Screenshot 2023-03-28 at 6 38 11 AM

Repro Steps

  1. Highlight and comment on some text in a post
  2. Leave a comment and suggest something similar, with something at the start and also in the middle of the highlighted text
  3. Click "Save" and observe the new highlight position/length

robin-macpherson avatar Mar 28 '23 13:03 robin-macpherson