Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,14 +118,12 @@ static StringVector splitSearchTokens(std::string str) | |
} | ||
|
||
StringVector result = split(str, " "); | ||
if (result.empty()) | ||
const auto remover = [](const auto& part) | ||
{ | ||
return result; | ||
} | ||
const auto remover = [](const auto& part){ | ||
return part.size() < 4; | ||
return part.empty() || part[0] == '%'; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
apolukhin
Author
Contributor
|
||
}; | ||
result.erase(std::remove_if(result.begin()+1, result.end(), remover), result.end()); | ||
result.erase(std::remove_if(result.begin(),result.end(),remover),result.end()); | ||
|
||
return result; | ||
} | ||
|
||
|
Didn't test, but wouldn't it be better that the
%
is skipped in this case?Or is this done in the next commits?