zero width joiner for emojis so no space is added when converting

This commit is contained in:
Sam 2016-03-10 08:58:19 +11:00
parent fe684fdfb8
commit f590036525

View file

@ -174,7 +174,7 @@ Discourse.Dialect.addPreProcessor(function(text) {
var before = text.charAt(m.index-1); var before = text.charAt(m.index-1);
if (!/\B/.test(before)) { if (!/\B/.test(before)) {
replacement = " " + replacement; replacement = "\u200b" + replacement;
} }
text = text.replace(m[0], replacement); text = text.replace(m[0], replacement);