chore: update emoji-regex, replace copyright character (#2202)
This commit is contained in:
parent
2131ababf3
commit
52880a4689
|
@ -66,7 +66,7 @@
|
|||
"css-dedoupe": "^0.1.1",
|
||||
"emoji-picker-element": "^1.13.1",
|
||||
"emoji-picker-element-data": "^1.3.0",
|
||||
"emoji-regex": "^9.2.2",
|
||||
"emoji-regex": "^10.2.1",
|
||||
"encoding": "^0.1.13",
|
||||
"es-main": "^1.2.0",
|
||||
"escape-html": "^1.0.3",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import emojiRegex from 'emoji-regex/es2015/text.js'
|
||||
import emojiRegex from 'emoji-regex'
|
||||
import { thunk } from './thunk.js'
|
||||
|
||||
export const getEmojiRegex = thunk(emojiRegex)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { getEmojiRegex } from './emojiRegex.js'
|
||||
|
||||
// \ufe0f is a variation selector, which seems to appear for some reason in e.g. ™
|
||||
const NON_EMOJI_REGEX = /^(?:[0-9#*]|™|®|\ufe0f)+$/
|
||||
const NON_EMOJI_REGEX = /^(?:[0-9#*]|™|®|©|\ufe0f)+$/
|
||||
|
||||
// replace emoji in HTML with something else, safely skipping HTML tags
|
||||
export function replaceEmoji (string, replacer) {
|
||||
|
|
|
@ -67,13 +67,13 @@ describe('test-emoji.js', function () {
|
|||
'it\'s over #9000'
|
||||
)
|
||||
assert.strictEqual(
|
||||
replaceEmoji('woot !@#$%^&*()~' + '`' + '{[}]:;"\'<,>.?/£™℠®', replacer),
|
||||
'woot !@#$%^&*()~' + '`' + '{[}]:;"\'<,>.?/£™℠®'
|
||||
replaceEmoji('woot !@#$%^&*()~' + '`' + '{[}]:;"\'<,>.?/£™℠®©', replacer),
|
||||
'woot !@#$%^&*()~' + '`' + '{[}]:;"\'<,>.?/£™℠®©'
|
||||
)
|
||||
|
||||
assert.strictEqual(
|
||||
replaceEmoji('woot !@#$%^&*()~' + '`' + '{[}]:;"\'<,>.?/£™℠®', replacer),
|
||||
'woot !@#$%^&*()~' + '`' + '{[}]:;"\'<,>.?/£™℠®'
|
||||
replaceEmoji('woot !@#$%^&*()~' + '`' + '{[}]:;"\'<,>.?/£™℠®©', replacer),
|
||||
'woot !@#$%^&*()~' + '`' + '{[}]:;"\'<,>.?/£™℠®©'
|
||||
)
|
||||
|
||||
// hidden VARIATION SELECTOR character is in here
|
||||
|
|
10
yarn.lock
10
yarn.lock
|
@ -2659,16 +2659,16 @@ emoji-picker-element@^1.13.1:
|
|||
resolved "https://registry.yarnpkg.com/emoji-picker-element/-/emoji-picker-element-1.13.1.tgz#721e2afb72c546f8f0b33766bd792b2dc70e4480"
|
||||
integrity sha512-xOUYg6piwCmnYJw5Uh47rV5F2CwcFZcbfZx5jzU43gELJDbg8hrv6CBsikVe5VJSyiUH+N2QeQHc2f0h+V74PA==
|
||||
|
||||
emoji-regex@^10.2.1:
|
||||
version "10.2.1"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.2.1.tgz#a41c330d957191efd3d9dfe6e1e8e1e9ab048b3f"
|
||||
integrity sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA==
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
|
||||
emoji-regex@^9.2.2:
|
||||
version "9.2.2"
|
||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"
|
||||
integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==
|
||||
|
||||
emojis-list@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78"
|
||||
|
|
Loading…
Reference in New Issue