mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-15 21:49:20 +00:00
parent
c7db03fa04
commit
38168bbfc4
|
@ -41,13 +41,16 @@ inline auto make_ci_matcher(const std::vector<std::string>& keywords)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool matched = false;
|
||||||
for(const auto& keyword : keywords) {
|
for(const auto& keyword : keywords) {
|
||||||
if (translation::ci_search(keyword, text)) {
|
bool matched2 = true;
|
||||||
return true;
|
for(const auto& word : utils::split(text, ' ')) {
|
||||||
|
matched2 = matched2 && translation::ci_search(keyword, word);
|
||||||
}
|
}
|
||||||
|
matched = matched || matched2;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return matched;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user