Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
823185ec
Commit
823185ec
authored
Nov 08, 2016
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug where search terms with colons were not searchable
parent
339c5d43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
...avascripts/filtered_search/filtered_search_manager.js.es6
+7
-2
No files found.
app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
View file @
823185ec
...
@@ -76,10 +76,13 @@
...
@@ -76,10 +76,13 @@
const inputs = input.split(' ');
const inputs = input.split(' ');
let searchTerms = '';
let searchTerms = '';
const addSearchTerm = function addSearchTerm(term) {
searchTerms += term + ' ';
}
inputs.forEach((i) => {
inputs.forEach((i) => {
const colonIndex = i.indexOf(':');
const colonIndex = i.indexOf(':');
// Check if text is a token
if (colonIndex !== -1) {
if (colonIndex !== -1) {
const tokenKey = i.slice(0, colonIndex).toLowerCase();
const tokenKey = i.slice(0, colonIndex).toLowerCase();
const tokenValue = i.slice(colonIndex + 1);
const tokenValue = i.slice(colonIndex + 1);
...
@@ -93,9 +96,11 @@
...
@@ -93,9 +96,11 @@
key: match.key,
key: match.key,
value: tokenValue,
value: tokenValue,
});
});
} else {
addSearchTerm(i);
}
}
} else {
} else {
searchTerms += i + ' '
;
addSearchTerm(i)
;
}
}
}, this);
}, this);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment