When applying bold to selected text, Obsidian should trim whitespace from the beginning and end of the selection

When I try to bold text, I sometimes unexpectedly bold more text than I wanted to, because I selected a trailing space.

Example

Comment

I find this happens especially often when I’m editing on a touch screen device.

In most text editors (e.g. Google Docs, Bear…), if your selection includes a trailing space, that doesn’t mean you end up bolding the entire selection AND all the text that follows. So I think the current behavior will seem like a bug to most people.

Edit: Well, it doesn’t seem like a bug to Whitenoise, so I’m posting as a feature request, per their request.

Environment

  • Operating system: Mac, iOS, Android
  • Obsidian version: 0.12.5
3 Likes

Bumping this one. I still think this should be thought of as a bug. This non-standard behaviour causes minor friction for me (and presumably most users?) many times per day.

Whenever I select text, I’m careful to pick up or avoid adjoining whitespace because it will be transmitted to any program I paste to.
Bolding is slightly different. Many editor formats bold only text and not the whitespace. But with markdown there has to be a decision about where the markup syntax is placed, and I can understand that respecting any whitespace included.

I would guess that >95% of the time, people who select extra whitespace and press CMD+B do not want the result they get on current behaviour.

Actually I’m struggling to imagine any case where the current behaviour is desirable, but I’ve not tried hard so I guess I’m missing something.

this has been implemented at some point.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.