FIX: Can do multiple `:)` emojis on one line
This commit is contained in:
parent
0bb02505b0
commit
7fb1b4dded
|
@ -61,10 +61,11 @@
|
||||||
|
|
||||||
Discourse.Dialect.registerInline(':', function(text, match, prev) {
|
Discourse.Dialect.registerInline(':', function(text, match, prev) {
|
||||||
var endPos = text.indexOf(':', 1),
|
var endPos = text.indexOf(':', 1),
|
||||||
|
firstSpace = text.search(/\s/),
|
||||||
contents;
|
contents;
|
||||||
|
|
||||||
// If there is no trailing colon, check our translations that begin with colons
|
// 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;
|
translationColonRegexp.lastIndex = 0;
|
||||||
var match = translationColonRegexp.exec(text);
|
var match = translationColonRegexp.exec(text);
|
||||||
if (match && match[0]) {
|
if (match && match[0]) {
|
||||||
|
|
Loading…
Reference in New Issue