remove unnecessary plus checks in emoji regexes

Signed-off-by: macekj <macekj@umich.edu>
This commit is contained in:
macekj 2020-11-27 19:41:45 -05:00
parent 2ffdfaef68
commit 200c061968
2 changed files with 3 additions and 3 deletions

View file

@ -47,8 +47,8 @@ import AutocompleteWrapperModel from "../../../editor/autocomplete";
import DocumentPosition from "../../../editor/position";
import {ICompletion} from "../../../autocomplete/Autocompleter";
// matches emoticons which follow the start of a line, whitespace, or a plus at the start of a line
const REGEX_EMOTICON_WHITESPACE = new RegExp('(?:^|\\s|^\\+)(' + EMOTICON_REGEX.source + ')\\s$');
// matches emoticons which follow the start of a line or whitespace
const REGEX_EMOTICON_WHITESPACE = new RegExp('(?:^|\\s)(' + EMOTICON_REGEX.source + ')\\s$');
const IS_MAC = navigator.platform.indexOf("Mac") !== -1;