From 00983ab796244d0f782c32906789b45d42d4a28a Mon Sep 17 00:00:00 2001 From: Song Date: Tue, 14 Feb 2017 15:47:04 +0800 Subject: [PATCH] fix emoji replacing error (#76) --- src/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.js b/src/util.js index b9d41710..8f182dff 100644 --- a/src/util.js +++ b/src/util.js @@ -161,6 +161,6 @@ export const merge = Object.assign || function (to) { export function emojify (text) { return text .replace(/<(pre|template)[^>]*?>([\s\S]+)<\/(pre|template)>/g, match => match.replace(/:/g, '__colon__')) - .replace(/:(\w*?):/ig, '$1') + .replace(/:(\w+?):/ig, '$1') .replace(/__colon__/g, ':') }