Editing multiple links on one line will cause some of them to be lost

What’s The Bug?

Editing multiple links on one line will cause some of them to be lost.

How To Reproduce It

  1. Enter text: GoogleYouTube
  2. Select Google, and then paste https://www.google.com/ to make Google become a link.
  3. Select YouTube and cut
  4. Press home key to move the cursor in front of Google
  5. Paste to make YouTube appear in front of Google
  6. Separate two texts with spaces by several spaces between YouTube and Google
  7. Select YouTube and paste https://www.youtube.com/ to make YouTube become a link
  8. At this time, the Google link that was supposed to be turned into ordinary text, and the link was lost.

The Expected Behavior

The original link will not disappear

Device

PC

OS

Windows11

Anytype Version

v0.40.8

Technical Information

操作系统版本: win32 x64 10.0.22621
应用版本: 0.40.8
构建版本: build on 2024-04-25 13:28:54 +0000 UTC at #4ec64b016e2be3a5229dc865452c066f653e209c (dirty)
库版本: v0.33.2
Anytype 身份标识: A8Dj8qdQehkSC4UNQdXUyeMCyXvBUdVk8b7P7CM39SqRZnub
分析 ID: 31896c9d-58bb-4d02-a598-0e7a0f3916c5
设备 ID: 12D3KooWHdUFZXi5Tr3HfhsVNhW8ruQun8CPd8Jg9QBHXLcZUppX

Hey @Ming_anytype. Seems like the issue is in step 6. You seem to think that if you add spaces, that the links will be separated?

image

Even if you add spaces, this is still counted as one link, and when you then in step 7 paste a link over Youtube, the original link is supposed to be deleted.

image

I want the following result to appear
1111
Meaning, the same line of text has different links. And after repeated editing, these links will not be lost.

This report has been added to our issue tracker and received by the Development Team.

This issue has been fixed by the Development Team and will be implemented in an upcoming release.