Here’s a small detail I keep bumping into: When adding a link to text in Post edit, if the selection includes the leading space that space will be swallowed in the process.
Testingthe leading space on Meta. Yep, it does the same. I try to be more careful but it keeps happening and might be a quick thing to fix…
In your example you select the leading space when creating the link. That’s not typical behavior. Try selecting the word without the space and the issue won’t occur.
It’s hard to call this a bug as the toolbar button is trimming white space from the selection because whitespace within anchors looks messy.
The latter is only happening because you’re selecting the leading space, don’t do that and the link presentation cleanup won’t hit you.
You are correct but a nice user convenience feature would be to detect this and fix it up for the user, if a single leading or trailing space is selected, put them back in the replacement.