Merge branch 'fix-emoji-popup' into 'master'

Hide emoji popup after multiple spaces or blank lines, closes #40620,#33678

Closes #40620 and #33678

See merge request gitlab-org/gitlab-ce!17680
This commit is contained in:
Sean McGivern 2018-03-14 10:39:02 +00:00
commit 7e4fcbf9be
2 changed files with 6 additions and 2 deletions

View file

@ -132,9 +132,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;
},

View file

@ -0,0 +1,5 @@
---
title: Hide emoji popup after multiple spaces
merge_request:
author: Jan Beckmann
type: fixed