Toggle Bold/Italic including extra spaces after 1.4.5

What I’m trying to do

Hello,

before the latest update (1.4.5, macOS) I could select a sentence or term and the spaces before and/or after it and toggling italic or bold would place the asteriscs right alongside the word, ignoring the spaces. However, now it places it exactly where the selection starts or ends, meaning it includes the spaces before and after the selected words (if they’re selected).

The thing is, I use the mouse/trackpad a lot for selecting, and I’m usually imprecise when selecting, specially when it comes to these extra spaces, and so this new behaviour is an issue for me, mostly because it messes up the formatting in editing mode (e.g. it makes the worng things italic/bold, or doesn’t make the selection bold/italic, etc.).

I understand the lastest update made changes to toggling bold/italic, and I’m wondering whether this behaviour a) is expected b) can be reverted to the way it was before the update (i.e. toggling bold/italix ignores single spaces before and after selection, thus not making wrong parts of the text aquire unwanted formatting while in editing mode).

I’ve just noticed toggling bold/italic here in the forum text editor has the behaviour that I’m missing in the new version of Obsidian, it seems to adjust the selection to remove the extra spaces before adding the asteriscs.

I’m unsure if this is the proper way to ask this, sorry in advance.

2 Likes

you are not the only one…
and it also affects comments and strikethroughs

my workflow (my button with a commander macro) is also shot

trying now with other way (Templater) but not happy with that either…

1 Like

Well, not to talk bad about plugins, but when i use Quickadd to add bold and if my selection isn’t precise, Quickadd won’t strip for me spaces before and after the selection .
Of course, this way something else gets bold but not what i wanted to be bold. I should report this bug, if there isn’t already a request

But Obsidian really needs to keep this parsing features, I still work with the previous version of Obsidian as I’m unhappy with the current build

one thing I like is not have to select word, just position cursor on any character within word and press key combination to bold the text – that’s good though

I’ve found that if I double-tap inside a word, on MacOS, it switches to word selection, and when I then drag it keeps selecting words, and excluding the spaces. Using the technique I can be rather sloppy when selecting, but still get the proper word(s) or sentences excluding the leading/trailing spaces.

2 Likes

Thanks for this nice mac tip. Actually you don’t need tap to click setting to be ON when using that selection method. In other words double clicking and then dragging works as well. It works to both left and right but it doesn’t include sentence periods unless you drag to include the period.

Other tips:

  • click or tap three times to select paragraph
  • two finger click and then hold one finger to select context menu actions (selection happens when you release your finger)

will be fixed 1.4.9

4 Likes

Hey, thanks for addressing the issue. I’m not sure the latest update was supposed to introduce a final fix for the issue, but I’d like to point out what it’s the current behaviour for me (1.4.12, macOS).

Toggling bold/italic now places the asterisks in the correct place, ignoring extra spaces immediately before or after the selected word/words. However, it’s still different from the old behavior (and the behaviour here in the forum editor), in that it doesn’t change/correct the selection itself (i.e. before, the asterisks would be placed and the current selection would be changed to the exact words within the asterisks; now, the selection is not entirely updated, will keep extra spaces selected and, additionally, inconsistently keeps some asterisks within the selected text and some out of the selected text).

This is specially problematic because, when you want to untoggle or change the formatting with a toggle command (when you previously had extra spaces within the selection), it messes up the asterisks, as it keeps one or more asterisks and extra spaces in the text.

This effectively prevents undoing the toggle entirely (i.e. removing all asterisks) and, thus, causes other issues when you do multiple consecutive toggle commands (e.g. untoggling bold and immediately after toggling italic, or toggling one and then the other), as you end up with unwanted and inconsistent formatting.
[I believe this is a result of not updating/correcting the selection when toggling formatting.]

Thank you!!

1 Like

will be fixed 1.4.14

1 Like

Thank you very much! Your work has changed my life.

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