mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-19 03:11:04 +02:00
Merge pull request #1168 from matrix-org/luke/fix-rte-ascii-suggestions
Match by emoji ascii regex first before shorthand
This commit is contained in:
commit
0864ad9c8a
@ -41,7 +41,7 @@ const CATEGORY_ORDER = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
// Match for ":wink:" or ascii-style ";-)" provided by emojione
|
// Match for ":wink:" or ascii-style ";-)" provided by emojione
|
||||||
const EMOJI_REGEX = new RegExp('(:\\w*:?|' + asciiRegexp + ')', 'g');
|
const EMOJI_REGEX = new RegExp('(' + asciiRegexp + '|:\\w*:?)', 'g');
|
||||||
const EMOJI_SHORTNAMES = Object.keys(EmojiData).map((key) => EmojiData[key]).sort(
|
const EMOJI_SHORTNAMES = Object.keys(EmojiData).map((key) => EmojiData[key]).sort(
|
||||||
(a, b) => {
|
(a, b) => {
|
||||||
if (a.category === b.category) {
|
if (a.category === b.category) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user