Which are:
- the emoji to complete is at the start of the query
- there is a whitespace character before the emoji
- there is an emoji before the emoji (so that several emoji can be input in-a-row)
Fixes https://github.com/vector-im/riot-web/issues/4498 (although it seems to be fixed through some other fix)
Plaintext emojis that start with ":" will also match against the shorthand regex but the match won't include the important part of the plaintext emoji. This means some emoji like ":)" won't be matched.
To fix this, put the ascii emoji regex first so that the match will be plaintext or otherwise it will fall through to the shorthand match (if there is one).
Fixes https://github.com/vector-im/riot-web/issues/4467
When a fully plaintext, ascii emoji is typed like ";-)", pressing tab will suggest emojione to replace it with based off of the meta data provided by emojione.
e.g. the aliases_ascii for `😃` are [":D",":-D","=D"] so typing ":D *tab*" will insert a real 😃
As of v2.7.2, fuse.js introduces a regression where the second argument to the constructor `Fuse` is assumed to be an object. There was one instance where we were not passing any argument. This fixes that.