Embedded links on a phrase with italics creates double-squares at the beginning and end of the italicized words

Describe the bug
Embedded links on a phrase with italics creates double squares at the beginning and end of the italicized words, on top of the double squares at the end

To Reproduce
Steps to reproduce the behavior:

  1. Type a sentence/phrase with normal font and italics. For example, The quick brown fox jumps over the lazy dog.
  2. Select the whole sentence, and then embed a link to a website.
  3. You will then see double-square symbol before “jumps”, after “over” and after “dog.”

Expected behavior
The double-square symbol should appear at the end of the selected text only (i.e., after “dog” only).

System Information:

  • OS: Windows 11
  • Device Manufacturer/Model: Microsoft
  • Anytype Version: 0.24.0"Anytype" menu on desktop)

Additional context
Add any other context about the problem here.

It seems there are actually three separate links created. I can “unlink” the first part, while the second and third link remain:

image

I can unlink the second link:

image

And be left with only a single link for “the lazy dog”

image

Thanks for sharing your experience. Did you select the whole sentence? If i do that I get the symbol before “jumps” as well. And my innocent question to the devs is this the expected behavior?

Good point. Yes, I selected the whole sentence. I also did get the icon before “Jumps” (so after “fox”), but I already removed that in my print screens.

1 Like

Could you reproduce this with different links?
I tried this on Windows and Linux and it looks fine to me.
grafik

Could you maybe make a recording of this?

1 Like

Edit: @Flip I know you asked for a video, but it took quite some time to test and type :stuck_out_tongue:. Let me know if you still prefer to have this “on tape”.

I think I found the culprit:

Describe the bug
When formatting text with markdown like _text_ for italics and __text__ for bold, an additional space is added, I expect to allow the user to continue typing without having to add a space themselves. When creating a link, that extra space is messing up the way the link is created. It seems that if the text in italics or in bold is NOT at the beginning of the line, an additional character (not a space) is also created at the beginning of the word:

To Reproduce
Steps to reproduce the behavior:

  1. Open any object
  2. Type some text with either _text_ or __text__ to make the text italics or bold. Notice the extra space added at the end. Do NOT remove this space.
  3. Select the text
  4. Click the chain icon to create a link
  5. Type any text. For example, type “link” or “https://anytype.io
  6. Click on the chain icon with the link text you typed to create the link

Expected behavior
The selected text is treated as a single “entity” to turn into a link.
You can also resolve the issue by removing the additional space each time you made a word italics with _.

System Information:

  • OS: Windows 11
  • Dell XPS 15
  • Anytype Version: 0.24.0

Additional context
This issue does not occur when making text italics or bold with the quick action bar as there is no extra space added that way.

1 Like

Can reproduce this now on Linux. Thanks for the work to clarify :+1:
I made the text italic via the Ctrl+i shortcut. Thats why it didn’t worked for me in the first try. Of course no video needed anymore.

1 Like

@edwin
There were some changes in the “inline link” function. Please check if this bug still occurs to you.
It works fine for me now.

Closing the topic because there is no response. Please open a new topic or flag this one to be reopened if you still experience this issue.

This topic was automatically closed after 10 days. New replies are no longer allowed.