Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFilipa Lacerda <lacerda.filipa@gmail.com>2017-02-02 16:40:04 +0300
committerJames Lopez <james@jameslopez.es>2017-02-02 16:46:02 +0300
commitf0558e873dcc3c3b6b745b656a89e64ffa6f593c (patch)
tree0c74eb4513a8aa93f0ead9e576bd8ff6fb8cedfd /app
parent773a066cbbed52ba3ef7d7d91b840d55a76148bd (diff)
Merge branch '27067-mention-user-dropdown-does-not-suggest-by-non-ascii-characters-in-name' into 'master'
Resolve "Mention @user dropdown does not suggest by non-ASCII characters in name" Closes #27067 See merge request !8729
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/gfm_auto_complete.js.es64
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/gfm_auto_complete.js.es6 b/app/assets/javascripts/gfm_auto_complete.js.es6
index 1f77a92d343..ff177114d5a 100644
--- a/app/assets/javascripts/gfm_auto_complete.js.es6
+++ b/app/assets/javascripts/gfm_auto_complete.js.es6
@@ -83,12 +83,12 @@
_a = decodeURI("%C3%80");
_y = decodeURI("%C3%BF");
- regexp = new RegExp("^(?:\\B|[^a-zA-Z0-9_" + atSymbolsWithoutBar + "]|\\s)" + flag + "(?![" + atSymbolsWithBar + "])([A-Za-z" + _a + "-" + _y + "0-9_\'\.\+\-]*)$", 'gi');
+ regexp = new RegExp("^(?:\\B|[^a-zA-Z0-9_" + atSymbolsWithoutBar + "]|\\s)" + flag + "(?![" + atSymbolsWithBar + "])(([A-Za-z" + _a + "-" + _y + "0-9_\'\.\+\-]|[^\\x00-\\x7a])*)$", 'gi');
match = regexp.exec(subtext);
if (match) {
- return match[2] || match[1];
+ return (match[1] || match[1] === "") ? match[1] : match[2];
} else {
return null;
}