Commit 7e4fcbf9 authored by Sean McGivern's avatar Sean McGivern

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
parents d5793292 2542d7e0
...@@ -132,9 +132,8 @@ class GfmAutoComplete { ...@@ -132,9 +132,8 @@ class GfmAutoComplete {
callbacks: { callbacks: {
...this.getDefaultCallbacks(), ...this.getDefaultCallbacks(),
matcher(flag, subtext) { matcher(flag, subtext) {
const relevantText = subtext.trim().split(/\s/).pop();
const regexp = new RegExp(`(?:[^${glRegexp.unicodeLetters}0-9:]|\n|^):([^:]*)$`, 'gi'); 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; return match && match.length ? match[1] : null;
}, },
......
---
title: Hide emoji popup after multiple spaces
merge_request:
author: Jan Beckmann
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment