Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Do not skip some emails in user search #8317

merged 1 commit into from Nov 11, 2019
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

@@ -136,7 +136,7 @@ function organizeResults(r, options) {
// will not find me, which is a reasonable compromise
// we also ignore if we notice a double space or a string that is only a space
const ignoreRegex = /([\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\/:;<=>?\[\]^`{|}~])|\s\s|^\s$/;
const ignoreRegex = /([\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*,\/:;<=>?\[\]^`{|}~])|\s\s|^\s$|^[^+]*\+[^@]*$/;

function skipSearch(term, allowEmails) {
if (term.indexOf("@") > -1 && !allowEmails) {
@@ -169,6 +169,9 @@ QUnit.test("it skips a search depending on punctuations", async assert => {
// 6 + email
assert.equal(results.length, 7);

results = await userSearch({ term: "", allowEmails: true });
assert.equal(results.length, 7);

results = await userSearch({ term: "" });
assert.equal(results.length, 0);

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.