Configuração de atalhos de emoji deve permitir escape com barras invertidas

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.

8 curtidas

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 \

So:

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

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

5 curtidas

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.

1 curtida

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.

4 curtidas

Este bug tem o mesmo problema de design semelhante a “underscores can break autolinks”, mas pode ser um “kludge” específico possível. Vou dar uma olhada no que pode ser feito.

Issue criada: Postpone escape info drop · Issue #840 · markdown-it/markdown-it · GitHub

2 curtidas

Discordo veementemente. “:)” simplesmente não é o mesmo que “:\u003cg\u003e)”.

Ainda assim, concordo que isso não é algo para se desperdiçar tempo/dinheiro. Irritante, mas compreensível.

Parece que @Vitaly corrigiu na v13, vamos atualizar para ela

2 curtidas

Um usuário no meu fórum reclamou sobre esse problema de formatação. Desabilitei o autocompletar de emoji como correção para o nosso caso de uso, mas como o Discourse foi atualizado para o markdown-it v13 há algum tempo, o problema parece persistir, enquanto a barra invertida agora funciona em https://markdown-it.github.io/\n\nIsso poderia ser porque o ember.js ainda está dependendo do markdown v12, como indicado aqui? \nMultisite build error: #<MiniRacer::RuntimeError: Error: Parser rule not found: fragments_join> - #6 by david

Estamos na 13 agora, pelo que sei… cc @david e o problema persiste.

Parece que temos nossa própria implementação de Emoji - não usamos a do markdown-it.

(atalhos definidos aqui, referenciados aqui. A lógica de substituição está aqui)

3 curtidas

Ah, então isso deve ser bem simples de consertar (famosas últimas palavras)

Estou começando a trabalhar nisso agora. :slight_smile:

Editar: Isso pode ser mais difícil do que eu pensava. :upside_down_face:

2 curtidas