Commit 2542d7e0 authored by Jan Beckmann's avatar Jan Beckmann

Hide emoji popup after multiple spaces or blank lines

Fixes #40620,#33678
parent afd2d381
...@@ -131,9 +131,8 @@ class GfmAutoComplete { ...@@ -131,9 +131,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