Inconsistent character escaping on paste

Hey there!

First off, I’m running SilverBullet 2.2.1-61-gce25cc9d

For a little bit of context, I’ve been using SB across a few different devices, including various OS’s (Fedora at home, Windows 11 at work, mainly). I’ve ran in to an issue sometimes at work, where I’ll paste a code snippet into SB to find that underscores (and I believe asterisks too, but I notice this less) get automatically escaped, so that: “_” turns into “\_”

This looks good in SB, because I get to see the underscore instead of it being treated as formatting, but when I copy the code snippet into a terminal for example, it causes issues.

This seems to happen sometimes regardless of if I’m pasting into a code block, but I usually notice it when I first type a backtick and then paste the code (with the intent of adding another backtick afterwards).

However, I didn’t want to post here on pure “it feels like this happens when…”, so I went to test it at home so I could be more specific with my question/s, but I can’t seem to get it to happen at all! I thought maybe it had something to do with how pasting in Windows 11 works, so I’ve tried on my partner’s computer and I couldn’t replicate the issue there either.

So, I guess my questions are, firstly, this is a SilverBullet function, right? Not something else going on that I’m only noticing in SilverBullet?

Secondly, is there something I’m misunderstanding about how this function is triggered?

Lastly, is there some way I can adjust the behaviour? Perhaps so that, when pasting between backticks or in code blocks, characters are never escaped?

Thanks a bunch for reading this and providing any insight, I’m sorry I couldn’t provide better replication steps!

ctrl + shift + v might help keep \ instead of \_ in my memory ?

Thanks for the input, unfortunately it doesn't seem to make a difference.

I'm also yet to find any consistency in this issue either, and I usually notice it while I'm particularly busy so I don't get a chance to dive deeper... :melting_face:

I'll keep an eye on it and if I notice any patterns I'll come back here.