提交 823185ec 编写于 作者: C Clement Ho

Fixed bug where search terms with colons were not searchable

上级 339c5d43
......@@ -76,10 +76,13 @@
const inputs = input.split(' ');
let searchTerms = '';
const addSearchTerm = function addSearchTerm(term) {
searchTerms += term + ' ';
}
inputs.forEach((i) => {
const colonIndex = i.indexOf(':');
// Check if text is a token
if (colonIndex !== -1) {
const tokenKey = i.slice(0, colonIndex).toLowerCase();
const tokenValue = i.slice(colonIndex + 1);
......@@ -93,9 +96,11 @@
key: match.key,
value: tokenValue,
});
} else {
addSearchTerm(i);
}
} else {
searchTerms += i + ' ';
addSearchTerm(i);
}
}, this);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册