summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2017-01-27 13:22:12 -0600
committerClement Ho <ClemMakesApps@gmail.com>2017-01-27 15:21:30 -0600
commit444ac6aa02e5b4b7025a9058a98dc6ae8db8e806 (patch)
tree4b6a23cc0c184b908438cb1c73600a336eda342e /app/assets
parent42836e8ef8ed6bf4b6748f6a9dc37d9173751bd1 (diff)
downloadgitlab-ce-444ac6aa02e5b4b7025a9058a98dc6ae8db8e806.tar.gz
Fix filtering usernames with multiple wordsfix-filtering-username-with-multiple-words
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/filtered_search/dropdown_user.js.es69
1 files changed, 8 insertions, 1 deletions
diff --git a/app/assets/javascripts/filtered_search/dropdown_user.js.es6 b/app/assets/javascripts/filtered_search/dropdown_user.js.es6
index 7bf199d9274..162fd6044e5 100644
--- a/app/assets/javascripts/filtered_search/dropdown_user.js.es6
+++ b/app/assets/javascripts/filtered_search/dropdown_user.js.es6
@@ -39,8 +39,15 @@
getSearchInput() {
const query = gl.DropdownUtils.getSearchInput(this.input);
const { lastToken } = gl.FilteredSearchTokenizer.processTokens(query);
+ let value = lastToken.value || '';
- return lastToken.value || '';
+ // Removes the first character if it is a quotation so that we can search
+ // with multiple words
+ if (value[0] === '"' || value[0] === '\'') {
+ value = value.slice(1);
+ }
+
+ return value;
}
init() {