diff options
author | Jan Beckmann <king-jan1999@hotmail.de> | 2018-03-11 22:02:55 +0300 |
---|---|---|
committer | Jan Beckmann <king-jan1999@hotmail.de> | 2018-03-11 22:21:53 +0300 |
commit | 2542d7e0a2f517eb739f2ac72a271a203aa4ad13 (patch) | |
tree | cc7511fb13f6053bfdef751239472c9121ea7840 /app/assets | |
parent | afd2d381119c3778140c3dd63c7ef24ecdb4c62e (diff) |
Hide emoji popup after multiple spaces or blank lines
Fixes #40620,#33678
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/gfm_auto_complete.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/assets/javascripts/gfm_auto_complete.js b/app/assets/javascripts/gfm_auto_complete.js index 57a1fa107e5..28c04b36d45 100644 --- a/app/assets/javascripts/gfm_auto_complete.js +++ b/app/assets/javascripts/gfm_auto_complete.js @@ -131,9 +131,8 @@ class GfmAutoComplete { callbacks: { ...this.getDefaultCallbacks(), matcher(flag, subtext) { - const relevantText = subtext.trim().split(/\s/).pop(); const regexp = new RegExp(`(?:[^${glRegexp.unicodeLetters}0-9:]|\n|^):([^:]*)$`, 'gi'); - const match = regexp.exec(relevantText); + const match = regexp.exec(subtext); return match && match.length ? match[1] : null; }, |