summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-01-23 09:38:12 +0000
committerPhil Hughes <me@iamphill.com>2017-01-23 09:38:12 +0000
commit203db3cf8fa61b9188583cae0ce0b6b4ebc1998c (patch)
treeb595197deb1ba1bc82522064efc04beb6f02456f
parent8e7929b874fbd8fe70c869eacde24ee3259e500c (diff)
downloadgitlab-ce-filtered-search-keyboard-navigation.tar.gz
Fixed replacing with a space after a colonfiltered-search-keyboard-navigation
-rw-r--r--app/assets/javascripts/filtered_search/dropdown_utils.js.es62
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/filtered_search/dropdown_utils.js.es6 b/app/assets/javascripts/filtered_search/dropdown_utils.js.es6
index 443ac222f70..eeab10fba17 100644
--- a/app/assets/javascripts/filtered_search/dropdown_utils.js.es6
+++ b/app/assets/javascripts/filtered_search/dropdown_utils.js.es6
@@ -84,7 +84,7 @@
let inputValue = input.value;
// Replace all spaces inside quote marks with underscores
// This helps with matching the beginning & end of a token:key
- inputValue = inputValue.replace(/"(.*?)"/g, str => str.replace(/\s/g, '_'));
+ inputValue = inputValue.replace(/("(.*?)"|:\s+)/g, str => str.replace(/\s/g, '_'));
// Get the right position for the word selected
// Regex matches first space