# Automatically add a space before the emoji if the user is typing Chinese and uses emoji picker

**URL:** <https://meta.discourse.org/t/automatically-add-a-space-before-the-emoji-if-the-user-is-typing-chinese-and-uses-emoji-picker/83285>\
**Category:** Feature\
**Created:** [March 19, 2018, 8:24am UTC](https://meta.discourse.org/t/automatically-add-a-space-before-the-emoji-if-the-user-is-typing-chinese-and-uses-emoji-picker/83285 "2018-03-19T08:24:02Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [March 20, 2018, 1:46am UTC](https://meta.discourse.org/t/automatically-add-a-space-before-the-emoji-if-the-user-is-typing-chinese-and-uses-emoji-picker/83285/4 "2018-03-20T01:46:32Z")

</div>

We half fixed this with:

[https://github.com/discourse/discourse/commit/d2a7a4916abecea389c99ae84de3bd40517b00d9](https://github.com/discourse/discourse/commit/d2a7a4916abecea389c99ae84de3bd40517b00d9)

But what we need to do is match the implementation here:

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/pretty-text/engines/discourse-markdown/emoji.js.es6#L154-L156](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/pretty-text/engines/discourse-markdown/emoji.js.es6#L154-L156)

Which is checking for `isSpace` or `isPunctChar`.

---

_[View the full topic](https://meta.discourse.org/t/automatically-add-a-space-before-the-emoji-if-the-user-is-typing-chinese-and-uses-emoji-picker/83285)._
