From ea43c4f184d6c25c4eac8e6f43a199f1817cc9c7 Mon Sep 17 00:00:00 2001 From: Victor Gavro Date: Wed, 30 May 2018 02:36:04 +0300 Subject: [PATCH] expose emoji unicode regexp that is internally used for emoji parsing (read only) --- 2/utils/generate | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/2/utils/generate b/2/utils/generate index 569fcd1c..70670977 100755 --- a/2/utils/generate +++ b/2/utils/generate @@ -502,6 +502,10 @@ function createTwemoji(re) { /*jshint maxparams:4 */ + // RegExp based on emoji's official Unicode standards + // http://www.unicode.org/Public/UNIDATA/EmojiSources.txt + var re = /twemoji/; + var // the exported module object twemoji = { @@ -561,6 +565,9 @@ function createTwemoji(re) { toCodePoint: toCodePoint }, + // expose emoji unicode RegExp that is internally used for parsing (read only) + re: re, + ///////////////////////// // methods // @@ -711,10 +718,6 @@ function createTwemoji(re) { '"': '"' }, - // RegExp based on emoji's official Unicode standards - // http://www.unicode.org/Public/UNIDATA/EmojiSources.txt - re = /twemoji/, - // avoid runtime RegExp creation for not so smart, // not JIT based, and old browsers / engines UFE0Fg = /\uFE0F/g, @@ -1066,4 +1069,4 @@ function createTwemoji(re) { ) + '\n */' ) + '());'); -} \ No newline at end of file +}