Spaces are required for emoji to display correctly in a CJK (Chinese, Japanese, and Korean) language context. For example,
你好:hugs:
displays
你好:hugs:
You have to add a space here: 你好 :hugs:
displays
你好
Spaces are rarely used in CJK, and most users don’t know about this issue so they end up with some untranslated emoji in their posts. It would be really great if you can make a special rule for CJK and emoji
They can simply insert the actual Unicode emoji via their native OS emoji picker. I am afraid this might be a giant can of worms @zogstrip so I am not sure if we should take it on right now.
Meaning if you see a space or a punctuation prior to : it can be an emoji.
The new algorithm for CJK with the client setting enable_inline_emoji_translation would be to remove that restriction. Basically if the site setting is enabled that whole if statement is skipped.
The alternative I am not too keen about is adding any kind of regex test cause it will impact performance on the MD engine. (eg: Unicode Kanji Code Table)
Even the reverse is hard, it is easy to detect “letter/number” but then we would also need to deal with Vietnamese and other heavily accented languages, so building this in is just too expensive.
We also need to make sure the emoji autocompleter is aware of this if possible.