Stop text from flickering while writing inside **bold** or *italic* syntax

Original Title: Prevent flickering bold text when writing and adding spaces between bold asterisks

Use case or problem

Like other text editors, I want to quickly press CMD B and write bold text seamlessly. In Obsidian, the text after the **bold asterisks** turns bold when I have a space before the 2nd **. I know there can’t be trailing whitespace for bold and italic text, but while I write sentences with lots of spaces, the text after it flickers, going back and forth between bold and unbold.

Screenshot 2023-06-04 at 2.53.31 PM

Screenshot 2023-06-04 at 2.53.41 PM

Screenshot 2023-06-05 at 2.10.10 PM

Proposed solution

Since there can’t be trailing whitepsace in bold and italic text, perhaps a delay could be added. When you add a space before the 2nd ** in bold text, it should wait 1-2 seconds, if the user hasn’t typed anything in that time then the text turns bold.

I made a Reddit video here showing how when I start typing bold text with non-bold text next to it, the text to the right flickers. I’m a fast typer and it ends up flickering very quickly and its annoying for my eyes.

I get it. It isn’t a request to break the Markdown spec. It’s about how you see any trailing text blinking bold and unbold as you type.

This isn’t very extreme or distracting with the default theme. But I can see with a different font or theme it could be more distracting. It’s even a bit more apparent if you also have it italicized, or have more trailing text.

Illustrative text “TEST TEXT” is after the bold:

boldBlink

Yes, you described it very well. It’s really annoying when I come back to a long paragraph later, I want to add bold text in the middle of it, and I see a bunch of bunch of lines flicker, like the video shows.

By the way, how do you put videos like that on this forum?

It’s a gif.

1 Like

I changed the title to “Stop text from flickering while writing inside bold or italic syntax”.

A solution would be to stop the flickering while the cursor is inside said syntyax.

Another option is to turn off auto pair matching, and just insert the end pair after the text has been written.

That’s one option, but I like to have formatting for text asap and gives me a bit of peace of mind to see that while writing a phrase if that makes sense. I think some other users think the same.