Skip to content

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

@robin-macpherson

Description

@robin-macpherson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions