fix(patches-selector): ignore punctuation marks when searching for patch (#1377)

This commit is contained in:
aAbed 2023-10-14 12:43:18 +00:00 committed by GitHub
parent 7a785a8163
commit 2dc92e26d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -209,7 +209,7 @@ class PatchesSelectorViewModel extends BaseViewModel {
query.isEmpty ||
query.length < 2 ||
patch.name.toLowerCase().contains(query.toLowerCase()) ||
patch.getSimpleName().toLowerCase().contains(query.toLowerCase()),
patch.name.replaceAll(RegExp(r'[^\w\s]+'), '').toLowerCase().contains(query.toLowerCase()),
)
.toList();
if (_managerAPI.areUniversalPatchesEnabled()) {