FIX: Can do multiple `:)` emojis on one line

This commit is contained in:
Robin Ward 2014-01-21 13:32:59 -05:00
parent 0bb02505b0
commit 7fb1b4dded
1 changed files with 2 additions and 1 deletions

View File

@ -61,10 +61,11 @@
Discourse.Dialect.registerInline(':', function(text, match, prev) {
var endPos = text.indexOf(':', 1),
firstSpace = text.search(/\s/),
contents;
// If there is no trailing colon, check our translations that begin with colons
if (endPos === -1) {
if (endPos === -1 || (firstSpace !== -1 && endPos > firstSpace)) {
translationColonRegexp.lastIndex = 0;
var match = translationColonRegexp.exec(text);
if (match && match[0]) {