chore: update emoji-regex, replace copyright character
This commit is contained in:
parent
601c3e40c9
commit
bf3c9382c2
|
@ -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
|
||||
|
|
12
yarn.lock
12
yarn.lock
|
@ -1111,7 +1111,7 @@
|
|||
"@jridgewell/sourcemap-codec" "^1.4.10"
|
||||
"@jridgewell/trace-mapping" "^0.3.9"
|
||||
|
||||
"@jridgewell/resolve-uri@3.1.0":
|
||||
"@jridgewell/resolve-uri@3.1.0", "@jridgewell/resolve-uri@^3.0.3":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
|
||||
integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
|
||||
|
@ -2634,16 +2634,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