Skip to content

Add Replace function to UText #5

@alecxvs

Description

@alecxvs

Scenario: The format bounds exist before the text selection

  • Solution: Unaffected

Scenario: The format bound(s) exist after the text selection

  • Solution: Move the bound to include the whole of the new phrase

Scenario: The format bound(s) exist within the text selection

  • Sub-scenario A: The new phrase is shorter, and the format bound if unmoved no longer intersects the phrase
    • Solution: Move the format bound to the end of the phrase
  • Sub-scenario B: The new phrase is the same length, larger, or is smaller but does not cut off any format bounds
    • Solution: Do not move the format bound
  • Sub-scenario C: The new phrase is shorter and both beginning and end bounds of the format are outside the new phrase length
    • Solution: Remove the format, it no longer has applicable contents

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions