emoji-shortname-to-image
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -41,5 +41,5 @@ const emojiRegex = require('emoji-regex'); | ||
_replaceShortNameWithImgTag (shortname) { | ||
const image = emojiMap[shortname].image; | ||
if (!image) return shortname; | ||
return `<img class="${this.klass}" src="${this.cdnUrl}${image}" alt="${shortname}" title="${shortname}" />`; | ||
const emoji = emojiMap[shortname]; | ||
if (!emoji) return shortname; | ||
return `<img class="${this.klass}" src="${this.cdnUrl}${emoji.image}" alt="${shortname}" title="${shortname}" />`; | ||
} | ||
@@ -46,0 +46,0 @@ |
{ | ||
"name": "emoji-shortname-to-image", | ||
"description": "Replace emoji shortnames with image tags", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |