diff --git a/package.json b/package.json index d5cad9dc0d..ac08372843 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "commonmark": "^0.28.1", "counterpart": "^0.18.0", "emojibase-data": "^4.0.0", - "emojibase-regex": "^4.0.0", + "emojibase-regex": "^3.0.0", "file-saver": "^1.3.3", "filesize": "3.5.6", "flux": "2.1.1", diff --git a/src/HtmlUtils.js b/src/HtmlUtils.js index d53d8e4864..5e6199579a 100644 --- a/src/HtmlUtils.js +++ b/src/HtmlUtils.js @@ -73,7 +73,7 @@ export function containsEmoji(str) { */ export function unicodeToShortcode(char) { const data = EMOJIBASE.find((e)=>{ e.unicode === char }); - return (data && data.shortcodes ? data.shortcodes[0] : ''; + return (data && data.shortcodes ? data.shortcodes[0] : ''); } /** diff --git a/src/autocomplete/EmojiProvider.js b/src/autocomplete/EmojiProvider.js index 50da9266dd..95654e403d 100644 --- a/src/autocomplete/EmojiProvider.js +++ b/src/autocomplete/EmojiProvider.js @@ -26,7 +26,7 @@ import type {Completion, SelectionRange} from './Autocompleter'; import _uniq from 'lodash/uniq'; import _sortBy from 'lodash/sortBy'; import SettingsStore from "../settings/SettingsStore"; -import { shortcodeToUnicode } from './HtmlUtils'; +import { shortcodeToUnicode } from '../HtmlUtils'; import UNICODE_REGEX from 'emojibase-regex'; import EMOTICON_REGEX from 'emojibase-regex/emoticon'; diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index 536c077a06..1f71855fa5 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -40,7 +40,6 @@ import Analytics from '../../../Analytics'; import dis from '../../../dispatcher'; -import * as RichText from '../../../RichText'; import * as HtmlUtils from '../../../HtmlUtils'; import Autocomplete from './Autocomplete'; import {Completion} from "../../../autocomplete/Autocompleter"; diff --git a/yarn.lock b/yarn.lock index 22072971eb..115aa73f45 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2576,10 +2576,15 @@ emoji-regex@^7.0.1: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== -emojione@2.2.7: - version "2.2.7" - resolved "https://registry.yarnpkg.com/emojione/-/emojione-2.2.7.tgz#46457cf6b9b2f8da13ae8a2e4e547de06ee15e96" - integrity sha1-RkV89rmy+NoTroouTlR94G7hXpY= +emojibase-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/emojibase-data/-/emojibase-data-4.0.0.tgz#3feb3e5bb5e5f2b6373b183b0f038c60889a9e29" + integrity sha512-Yi4A1IxB7iZ+09Wqr2BEpHSQfugc5I8G+wckDOhCia0F7oOdErf/85jCwbpRQy7xtBbvlyS3xQrYedSeQot5Og== + +emojibase-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/emojibase-regex/-/emojibase-regex-3.0.0.tgz#fc7a17aa20584df5a73619f06ac236b8a5bb452d" + integrity sha512-iNDkbtn8UxKTxjIlvHLqfXovZaIulnuuyo2/emU+ZlPr2OmzxGfiDI+iIQ3WWqdlA6lgjrPNWgpbytt4lnJYrg== emojis-list@^2.0.0: version "2.1.0"