Skip to content

Commit

Permalink
fix: allow the Util#parseEmoji regex to match emoji identifier (#2229)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceEEC authored and iCrawl committed Jan 4, 2018
1 parent 780a311 commit 2318812
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Util {
static parseEmoji(text) {
if (text.includes('%')) text = decodeURIComponent(text);
if (!text.includes(':')) return { animated: false, name: text, id: null };
const m = text.match(/<?(a)?:(\w{2,32}):(\d{17,19})>?/);
const m = text.match(/<?(a)?:?(\w{2,32}):(\d{17,19})>?/);
if (!m) return null;
return { animated: Boolean(m[1]), name: m[2], id: m[3] };
}
Expand Down

0 comments on commit 2318812

Please sign in to comment.