Ignoring italics in edit mode

I would like an underscore ( i.e “_” ) to stop showing the text that follows in italics. I use underscore in filenames. When I am creating a ‘[[’ link, everything after the underscore gets italicized. The text renders properly in the preview mode though.

I assume I can do this with some custom css. How do I do this?

Just to clarify, I am familiar with how to do change css, I do not know what to change.

1 Like

I am posting a solution to my own question here.

This does the trick:

.cm-em{
  font-style: normal;
}

I did the same thing with the bold markdown syntax

.cm-strong{
  font-weight: normal !important;
}
2 Likes

This works, but doesn’t solve the underlying problem. Ideally, the formatting in Edit Mode should only apply if the accompanying closing character is present as well.

Hopefully a future update to Obsidian resolves this!

I agree. In Edit mode, I type a single asterisk, such as in a password, and click away, the asterisk disappears and the following text is italicized. This should not happen. It should happen if there is a closing asterisk. I don’t believe that a single * constitutes valid mark-up