FIX: Emoticons were parsing twice sometimes.
This commit is contained in:
parent
50bab18206
commit
9ca0b0fe96
|
@ -7,7 +7,8 @@
|
|||
MD = event.MD;
|
||||
|
||||
dialect.inline[":"] = function(text, orig_match) {
|
||||
var m = /\:([a-z\_\+\-0-9]+)\:/.exec(text);
|
||||
var m = /^\:([a-z\_\+\-0-9]+)\:/.exec(text);
|
||||
|
||||
if (m && (emoji.indexOf(m[1]) !== -1)) {
|
||||
var url = Discourse.getURL('/assets/emoji/' + m[1] + '.png');
|
||||
return [m[0].length, ['img', {href: url, title: ':' + m[1] + ':', 'class': 'emoji', alt: m[1]}] ];
|
||||
|
@ -15,6 +16,7 @@
|
|||
};
|
||||
});
|
||||
|
||||
|
||||
if (Discourse && Discourse.ComposerView) {
|
||||
Discourse.ComposerView.on("initWmdEditor", function(event){
|
||||
|
||||
|
|
Loading…
Reference in New Issue