Enable emoji shortcuts setting should allow escaping with backslashes

When the enable emoji shortcuts setting is enabled emoticons like :) get turned into actual emoji (:slight_smile:). However, this can’t be bypassed with a simple backslash before it (\:)). This is inconsistent with other things where escape works, and on Discord, you have a similar setting:

However it is not forced – if I want :-) raw I can just type a backslash before it, and I get what I want.

To bypass it you need to use something like a zero-width character in between, or wrap a letter in angle brackets in the middle since those don’t render, etc. i.e.

:<g>), :​)

which causes a bad ux for users who want a bit more freedom with how they write emoji.


This is not just shortcuts it is all emojis. I guess I am not against changing it so we stop emoji-ing if we have preceding \


\:thinking: has parity with \`thinking` and \*thinking*

:thinking: has parity with `thinking` and *thinking*


I made a post about this on the roblox dev-forum which uses discourse, and I agree, having to always use empty characters, or anything to NOT use an emoji is kind of annoying; Emojis usually make your post a bit more unprofessional, and sometimes you want a little :) but you don’t want a :slight_smile:

I hope this gets changed, (“I guess it woudn’t update since it’s open-source and everything;”)

Actually I found this topic because I just stumbled into this inquiry myself (tried to escape a smiley but alas, it turned into an emoji AND swallowed my escape character … the audacity, ahah)

We have an existing bypass for this in backtick, e.g. :-) and :) … plus code blocks … not really sure we need even more methods to achieve the same goal?

My point was more of using emoji in actual conversation, and wouldn’t it just be a matter of not rendering the emoji, keeping it as an emoticon if there is a backslash before it ?

`` are for inline code, if you’re not having a programming discussion using code blocks doesn’t make sense. Even if it was it still doesn’t make sense as inline codes are generally used for highlighting a single line of code or for highlighting class/member names and such.

Not so – HTML will try to render if you type <a> for example. So inline code blocks are the expected way to render that.

Just not sure I want to spend valuable engineering time on something that we already have a way of handling.

I am putting PR welcome on this, had a 15 minute look at this and there is no trivial fix.

Our parser eats the escape code so by the time we have it we have no idea the escape was there.

Whatever fix exists here it will involve hacking markdown.it and upstreaming a patch. Very very complicated … cc @Vitaly

Same issue at https://markdown-it.github.io/

Recommend you open a ticket upstream, though this may mean we need to annotate text tokens with “original raw for the text token”.

Difficulty level on this is about 95.