improv(service): Also split names by _ for improved Pop!_Shop sorting

This commit is contained in:
Michael Aaron Murphy 2021-08-27 20:19:19 +02:00
parent 10d35d9379
commit 5e2c38e6d6

View file

@ -434,7 +434,7 @@ impl<O: futures::Sink<Response> + Unpin> Service<O> {
.map(|exec| exec.to_ascii_lowercase())
.unwrap_or_default();
for name in name.split_ascii_whitespace() {
for name in name.split_ascii_whitespace().flat_map(|x| x.split('_')) {
if name.starts_with(query) {
return 1.0;
}