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.

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!